mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-19 01:31:17 -10:00
Adding reference source for System.Data System.Data.DataSetExtensions System.Data.Entity System.Data.Entity.Design System.Data.Linq System.Data.SqlXml System.ServiceModel System.ServiceModel.Activation System.ServiceModel.Activities System.ServiceModel.Channels System.ServiceModel.Discovery System.ServiceModel.Internals System.ServiceModel.Routing System.ServiceModel.WasHosting System.ServiceModel.Web System.Web System.Web.ApplicationServices System.Web.DynamicData System.Web.Entity System.Web.Entity.Design System.Web.Extensions System.Web.Mobile System.Web.Routing System.Web.Services System.Xml System.Xml.Linq
61 lines
1.9 KiB
C#
61 lines
1.9 KiB
C#
//------------------------------------------------------------------------------
|
|
// <copyright file="IISMapPath.cs" company="Microsoft">
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// </copyright>
|
|
//------------------------------------------------------------------------------
|
|
|
|
namespace System.Web.Configuration {
|
|
using System.Configuration;
|
|
using System.Collections;
|
|
using System.Globalization;
|
|
using System.Xml;
|
|
using System.Text;
|
|
using System.Web.Util;
|
|
using System.Web.UI;
|
|
using System.IO;
|
|
using System.Web.Hosting;
|
|
|
|
//
|
|
// Abstracts the difference between Metabase and SitesSection IConfigMapPath.
|
|
//
|
|
static internal class IISMapPath {
|
|
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);
|
|
}
|
|
|
|
// A site name might be an id if it is a number.
|
|
static internal bool IsSiteId(string siteName) {
|
|
if (string.IsNullOrEmpty(siteName))
|
|
return false;
|
|
|
|
for (int i = 0; i < siteName.Length; i++) {
|
|
if (!Char.IsDigit(siteName[i])) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
return true;
|
|
}
|
|
}
|
|
}
|