示例#1
0
        public static string InferAppPoolName(string formatString, string siteName, SiteAppPoolMode NHRT)
        {
            if (String.IsNullOrEmpty(formatString))
            {
                throw new ArgumentNullException("formatString");
            }
            //
            NHRT |= SiteAppPoolMode.Dedicated;
            //
            formatString = formatString.Replace("#SITE-NAME#", siteName);
            //
            foreach (var fwVersionKey in MMD.Keys)
            {
                if ((NHRT & fwVersionKey) == fwVersionKey)
                {
                    formatString = formatString.Replace("#IIS6-ASPNET-VERSION#", MMD[fwVersionKey][IIS6]);
                    formatString = formatString.Replace("#IIS7-ASPNET-VERSION#", MMD[fwVersionKey][IIS7]);
                    //
                    break;
                }
            }
            //
            SiteAppPoolMode pipeline = NHRT & (SiteAppPoolMode.Classic | SiteAppPoolMode.Integrated);

            formatString = formatString.Replace("#PIPELINE-MODE#", pipeline.ToString());
            //
            return(formatString.Trim());
        }
示例#2
0
        public static string WhatFrameworkVersionIs(SiteAppPoolMode value)
        {
            SiteAppPoolMode dotNetVersion = value & (SiteAppPoolMode.dotNetFramework1
                                                     | SiteAppPoolMode.dotNetFramework2 | SiteAppPoolMode.dotNetFramework4);

            //
            return(String.Format("v{0}", MMD[dotNetVersion][IIS7]));
        }
示例#3
0
		//
		public ManagedPipelineMode runtime_pipeline(SiteAppPoolMode m)
		{
			return (pipeline(m) == SiteAppPoolMode.Classic) ? ManagedPipelineMode.Classic : ManagedPipelineMode.Integrated;
		}
示例#4
0
		//
		public string aspnet_runtime(SiteAppPoolMode m)
		{
			return WebAppPool.AspNetVersions[dotNetVersion(m)];
		}
示例#5
0
		//
		public SiteAppPoolMode isolation(SiteAppPoolMode m)
		{
			return m & (SiteAppPoolMode.Shared | SiteAppPoolMode.Dedicated);
		}
示例#6
0
		//
		public SiteAppPoolMode pipeline(SiteAppPoolMode m)
		{
			return m & (SiteAppPoolMode.Classic | SiteAppPoolMode.Integrated);
		}
示例#7
0
		//
		public SiteAppPoolMode dotNetVersion(SiteAppPoolMode m)
		{
			return m & (SiteAppPoolMode.dotNetFramework1 | SiteAppPoolMode.dotNetFramework2 | SiteAppPoolMode.dotNetFramework4);
		}
示例#8
0
		public static string WhatFrameworkVersionIs(SiteAppPoolMode value)
		{
			SiteAppPoolMode dotNetVersion = value & (SiteAppPoolMode.dotNetFramework1 
				| SiteAppPoolMode.dotNetFramework2 | SiteAppPoolMode.dotNetFramework4);
			//
			return String.Format("v{0}", MMD[dotNetVersion][IIS7]);
		}
示例#9
0
		public static string InferAppPoolName(string formatString, string siteName, SiteAppPoolMode NHRT)
		{
			if (String.IsNullOrEmpty(formatString))
				throw new ArgumentNullException("formatString");
			//
			NHRT |= SiteAppPoolMode.Dedicated;
			//
			formatString = formatString.Replace("#SITE-NAME#", siteName);
			//
			foreach (var fwVersionKey in MMD.Keys)
			{
				if ((NHRT & fwVersionKey) == fwVersionKey)
				{
					formatString = formatString.Replace("#IIS6-ASPNET-VERSION#", MMD[fwVersionKey][IIS6]);
					formatString = formatString.Replace("#IIS7-ASPNET-VERSION#", MMD[fwVersionKey][IIS7]);
					//
					break;
				}
			}
			//
			SiteAppPoolMode pipeline = NHRT & (SiteAppPoolMode.Classic | SiteAppPoolMode.Integrated);
			formatString = formatString.Replace("#PIPELINE-MODE#", pipeline.ToString());
			//
			return formatString.Trim();
		}