public ConfiguratorAttribute(Type configurator, params object[] Params) { if (configurator == null) throw new Exception("Configurator cannot be null!"); if (!configurator.IsSubclassOf(typeof(AbstractConfigurator))) throw new Exception("Configurator must derive from AbstractConfigurator"); _Configurator = (AbstractConfigurator)Activator.CreateInstance(configurator, Params); }
public ConfiguratorAttribute(Type configurator, params object[] Params) { if (configurator == null) { throw new Exception("Configurator cannot be null!"); } if (!configurator.IsSubclassOf(typeof(AbstractConfigurator))) { throw new Exception("Configurator must derive from AbstractConfigurator"); } _Configurator = (AbstractConfigurator)Activator.CreateInstance(configurator, Params); }
public ConfiguratorAttribute() { _Configurator = new ConfigFileConfigurator(); }