Ejemplo n.º 1
0
 public WebConfiguration(NamespaceMapper namespaceMapper)
 {
     Assets = new AssetsConfiguration();
     ScriptsToInclude = new ScriptsToInclude();
     PathsToNamespaces = new PathToNamespaceMappers();
     NamespaceMapper = namespaceMapper;
 }
Ejemplo n.º 2
0
 public WebConfiguration(NamespaceMapper namespaceMapper)
 {
     Assets            = new AssetsConfiguration();
     ScriptsToInclude  = new ScriptsToInclude();
     PathsToNamespaces = new PathToNamespaceMappers();
     NamespaceMapper   = namespaceMapper;
 }
Ejemplo n.º 3
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;
        }
Ejemplo n.º 4
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
        }
Ejemplo n.º 5
0
        public WebConfiguration(
            NamespaceMapper namespaceMapper
            )
        {
            Assets            = new AssetsConfiguration();
            ScriptsToInclude  = new ScriptsToInclude();
            PathsToNamespaces = new PathToNamespaceMappers();
            NamespaceMapper   = namespaceMapper;

#if (NET461)
            ApplicationPhysicalPath = System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath;
#else
            // Todo: Temporary hack!!! Use ContentRoot in IHostingEnvironment
            ApplicationPhysicalPath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot");
#endif
        }
Ejemplo n.º 6
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);
        }