Пример #1
0
		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);
    }
Пример #2
0
        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);
        }
Пример #3
0
 public ConfiguratorAttribute()
 {
     _Configurator = new ConfigFileConfigurator();
 }
Пример #4
0
 public ConfiguratorAttribute()
 {
   _Configurator = new ConfigFileConfigurator();
 }