static internal IConfigMapPath GetInstance()
        {
            // IIS 7 bits on <= IIS 6.x: use the metabase
            if (ServerConfig.UseMetabase)
            {
                return((IConfigMapPath)MetabaseServerConfig.GetInstance());
            }

            if (ServerConfig.IISExpressVersion != null)
            {
                return((IConfigMapPath)ServerConfig.GetInstance());
            }

            ProcessHost host = ProcessHost.DefaultHost;
            IProcessHostSupportFunctions functions = null;

            if (null != host)
            {
                functions = host.SupportFunctions;
            }

            if (functions == null)
            {
                functions = HostingEnvironment.SupportFunctions;
            }

            return(new ProcessHostMapPath(functions));
        }
        static internal IServerConfig GetInstance() {
            if (s_instance == null) {
                lock (s_initLock) {
                    if (s_instance == null) {
                        s_instance = new MetabaseServerConfig();
                    }
                }
            }

            return s_instance;
        }
Beispiel #3
0
 internal static IServerConfig GetInstance()
 {
     if (UseMetabase)
     {
         return(MetabaseServerConfig.GetInstance());
     }
     if (IISExpressVersion == null)
     {
         return(ProcessHostServerConfig.GetInstance());
     }
     return(ExpressServerConfig.GetInstance(IISExpressVersion));
 }
 static internal IServerConfig GetInstance()
 {
     // IIS 7 bits on <= IIS 6: use the metabase
     if (UseMetabase)
     {
         return(MetabaseServerConfig.GetInstance());
     }
     if (IISExpressVersion == null)
     {
         return(ProcessHostServerConfig.GetInstance());
     }
     return(ExpressServerConfig.GetInstance(IISExpressVersion));
 }
 internal static IServerConfig GetInstance()
 {
     if (s_instance == null)
     {
         lock (s_initLock)
         {
             if (s_instance == null)
             {
                 s_instance = new MetabaseServerConfig();
             }
         }
     }
     return(s_instance);
 }
        internal static IConfigMapPath GetInstance()
        {
            if (ServerConfig.UseMetabase)
            {
                return((IConfigMapPath)MetabaseServerConfig.GetInstance());
            }
            if (ServerConfig.IISExpressVersion != null)
            {
                return((IConfigMapPath)ServerConfig.GetInstance());
            }
            ProcessHost defaultHost = ProcessHost.DefaultHost;
            IProcessHostSupportFunctions supportFunctions = null;

            if (defaultHost != null)
            {
                supportFunctions = defaultHost.SupportFunctions;
            }
            if (supportFunctions == null)
            {
                supportFunctions = HostingEnvironment.SupportFunctions;
            }
            return(new ProcessHostMapPath(supportFunctions));
        }