Example #1
0
 public object Create(object parent, object configContext, XmlNode section)
 {
     var config = new Config();
     
     //todo agregar items en el web.xml
     return config;
 }
Example #2
0
        /// <summary>
        ///     Crea una instancia factories y agrega http application inyectandolas de manera facil
        /// </summary>
        /// <param name="config">config</param>
        /// <returns>Nueva instancia de Engine</returns>
        protected static IEngine CreateEngineInstance(Config config)
        {
            if (config == null || string.IsNullOrEmpty(config.EngineType))
                return new SoftEngine();

            var engineType = Type.GetType(config.EngineType);
            if (engineType == null)
                throw new ConfigurationErrorsException("El tipo '" + config.EngineType +
                                                       "' no se encuentra. Por favor revise la configuracion en  /configuration/soft/engine[@engineType] o revise assemblies perdidos.");
            if (!typeof(IEngine).IsAssignableFrom(engineType))
                throw new ConfigurationErrorsException("El tipo '" + engineType +
                                                       "' no implementa 'Soft.Core.Infrastructure.IEngine' y no puede ser configurado en /configuration/soft/engine[@engineType] para ese proposito.");
            return Activator.CreateInstance(engineType) as IEngine;
        }
Example #3
0
 public WebAppTypeFinder(Config config)
 {
     EnsureBinFolderAssembliesLoaded = config.DynamicDiscovery;
 }
Example #4
0
 public UserAgentHelper(Config config, IWebHelper webHelper, HttpContextBase httpContext)
 {
     _config = config;
     _webHelper = webHelper;
     _httpContext = httpContext;
 }