public object Create(object parent, object configContext, XmlNode section) { var config = new Config(); //todo agregar items en el web.xml return config; }
/// <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; }
public WebAppTypeFinder(Config config) { EnsureBinFolderAssembliesLoaded = config.DynamicDiscovery; }
public UserAgentHelper(Config config, IWebHelper webHelper, HttpContextBase httpContext) { _config = config; _webHelper = webHelper; _httpContext = httpContext; }