public WebConfiguration( NamespaceMapper namespaceMapper ) { Assets = new AssetsConfiguration(); ScriptsToInclude = new ScriptsToInclude(); PathsToNamespaces = new PathToNamespaceMappers(); NamespaceMapper = namespaceMapper; #if (NET461) ApplicationPhysicalPath = System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath; #endif }
public static FunctionBody WithNamespaceMappersFrom(this FunctionBody global, PathToNamespaceMappers namespaceMappers) { foreach (var map in namespaceMappers.Maps) { global.Access("namespaceMapper", a => a.WithFunctionCall( f => f.WithName("addMapping").WithParameters("\"" + map.Key + "\"", "\"" + map.Value + "\""))); } return(global); }