public PluginAttribute(QTPlugin.PluginType pluginType, Type tProvider, int iKey) { this.PluginType = pluginType; if (tProvider.IsSubclassOf(typeof(LocalizedStringProvider))) { try { LocalizedStringProvider provider = (LocalizedStringProvider)Activator.CreateInstance(tProvider); provider.SetKey(iKey); this.Author = provider.Author; this.Name = provider.Name; this.Description = provider.Description; } catch (MissingMethodException) { this.Author = string.Empty; this.Name = "Name missing"; this.Description = "Default constuctor of LocalizedStringProvider is missing. \nContact the author of this plugin."; } } else { this.Author = string.Empty; this.Name = "Name missing"; this.Description = "The type is not subclass of LocalizedStringProvider. \nContact the author of this plugin."; } }
public PluginAttribute(QTPlugin.PluginType pluginType, string name, string author, string version, string description) { this.PluginType = pluginType; this.Name = name; this.Author = author; this.Version = version; this.Description = description; }
public PluginAttribute(QTPlugin.PluginType pluginType, Type tProvider, int iKey) { this.PluginType = pluginType; if(tProvider.IsSubclassOf(typeof(LocalizedStringProvider))) { try { LocalizedStringProvider provider = (LocalizedStringProvider)Activator.CreateInstance(tProvider); provider.SetKey(iKey); this.Author = provider.Author; this.Name = provider.Name; this.Description = provider.Description; } catch(MissingMethodException) { this.Author = string.Empty; this.Name = "Name missing"; this.Description = "Default constuctor of LocalizedStringProvider is missing. \nContact the author of this plugin."; } } else { this.Author = string.Empty; this.Name = "Name missing"; this.Description = "The type is not subclass of LocalizedStringProvider. \nContact the author of this plugin."; } }
public PluginAttribute(QTPlugin.PluginType pluginType, Type tProvider) : this(pluginType, tProvider, -1) { }
public PluginAttribute(QTPlugin.PluginType pluginType) { this.PluginType = pluginType; }