From 31c8c3bf7f1cb5e79d36b0b1d5c28907ea526011 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 27 Oct 2016 18:54:56 -0400 Subject: make open subtitle project portable --- OpenSubtitlesHandler/Interfaces/IMethodResponse.cs | 30 ++++++++++++++-------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'OpenSubtitlesHandler/Interfaces') diff --git a/OpenSubtitlesHandler/Interfaces/IMethodResponse.cs b/OpenSubtitlesHandler/Interfaces/IMethodResponse.cs index b8e24f12bd..9c05e357b9 100644 --- a/OpenSubtitlesHandler/Interfaces/IMethodResponse.cs +++ b/OpenSubtitlesHandler/Interfaces/IMethodResponse.cs @@ -37,17 +37,17 @@ namespace OpenSubtitlesHandler protected double seconds; protected string status; - protected virtual void LoadAttributes() + protected void LoadAttributes() { - foreach (Attribute attr in Attribute.GetCustomAttributes(this.GetType())) - { - if (attr.GetType() == typeof(MethodResponseDescription)) - { - this.name = ((MethodResponseDescription)attr).Name; - this.message = ((MethodResponseDescription)attr).Message; - break; - } - } + //foreach (Attribute attr in Attribute.GetCustomAttributes(this.GetType())) + //{ + // if (attr.GetType() == typeof(MethodResponseDescription)) + // { + // this.name = ((MethodResponseDescription)attr).Name; + // this.message = ((MethodResponseDescription)attr).Message; + // break; + // } + //} } [Description("The name of this response"), Category("MethodResponse")] @@ -59,4 +59,14 @@ namespace OpenSubtitlesHandler [Description("The status"), Category("MethodResponse")] public string Status { get { return status; } set { status = value; } } } + + public class DescriptionAttribute : Attribute + { + public DescriptionAttribute(string text) { } + } + + public class CategoryAttribute : Attribute + { + public CategoryAttribute(string text) { } + } } -- cgit v1.2.3