Exemplo n.º 1
0
        public WebConfiguration(
            NamespaceMapper namespaceMapper
            )
        {
            Assets            = new AssetsConfiguration();
            ScriptsToInclude  = new ScriptsToInclude();
            PathsToNamespaces = new PathToNamespaceMappers();
            NamespaceMapper   = namespaceMapper;

#if (NET461)
            ApplicationPhysicalPath = System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath;
#endif
        }
Exemplo n.º 2
0
        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);
        }