Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / IISMapPath.cs / 1305376 / IISMapPath.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- 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(); } 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; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- 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(); } 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; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Executor.cs
- ApplicationFileCodeDomTreeGenerator.cs
- SpeechUI.cs
- WebException.cs
- SqlConnection.cs
- WebPartCatalogAddVerb.cs
- ResourceContainer.cs
- ColumnCollection.cs
- FastEncoderWindow.cs
- SqlRecordBuffer.cs
- CounterSample.cs
- SuppressMergeCheckAttribute.cs
- TraceRecords.cs
- XmlSchemaSimpleTypeList.cs
- DrawingServices.cs
- XsltOutput.cs
- TemplateLookupAction.cs
- Vector3DAnimationBase.cs
- RowUpdatingEventArgs.cs
- Win32KeyboardDevice.cs
- SessionParameter.cs
- ReflectionServiceProvider.cs
- xamlnodes.cs
- NativeMethods.cs
- Run.cs
- IgnorePropertiesAttribute.cs
- MetadataHelper.cs
- EventEntry.cs
- Pair.cs
- AttributeCollection.cs
- TextEditor.cs
- AssemblyAssociatedContentFileAttribute.cs
- XmlSerializer.cs
- DataBinding.cs
- ParamArrayAttribute.cs
- GroupItemAutomationPeer.cs
- SearchForVirtualItemEventArgs.cs
- Animatable.cs
- StorageConditionPropertyMapping.cs
- FileDialog_Vista_Interop.cs
- WebBrowserDocumentCompletedEventHandler.cs
- DataControlHelper.cs
- BooleanAnimationBase.cs
- ModelUIElement3D.cs
- DiscoveryMessageProperty.cs
- ToolBarButton.cs
- MediaElementAutomationPeer.cs
- HttpCookieCollection.cs
- AxParameterData.cs
- ServicePointManagerElement.cs
- HttpCapabilitiesEvaluator.cs
- WindowsTokenRoleProvider.cs
- MouseDevice.cs
- MultilineStringEditor.cs
- SignHashRequest.cs
- LocatorBase.cs
- RotateTransform3D.cs
- DataRowCollection.cs
- UnhandledExceptionEventArgs.cs
- KeyFrames.cs
- initElementDictionary.cs
- EnumerableCollectionView.cs
- ExpressionBindingCollection.cs
- WindowsListViewItem.cs
- ErrorsHelper.cs
- RoutedPropertyChangedEventArgs.cs
- DesignerEventService.cs
- MonitorWrapper.cs
- TextTreeRootNode.cs
- Helpers.cs
- QuadraticBezierSegment.cs
- ContextStaticAttribute.cs
- StandardOleMarshalObject.cs
- _ConnectOverlappedAsyncResult.cs
- HashCodeCombiner.cs
- XmlDataCollection.cs
- KeyMatchBuilder.cs
- IntSecurity.cs
- UIAgentAsyncBeginRequest.cs
- StrokeIntersection.cs
- EntityEntry.cs
- SecurityElement.cs
- SafeMILHandle.cs
- StorageModelBuildProvider.cs
- GroupBoxDesigner.cs
- ByteStream.cs
- BamlLocalizationDictionary.cs
- Evidence.cs
- FunctionQuery.cs
- ChannelToken.cs
- FlowLayoutPanel.cs
- SecurityStandardsManager.cs
- Property.cs
- DataSourceCollectionBase.cs
- BindingSourceDesigner.cs
- Encoder.cs
- ClientProxyGenerator.cs
- VariableDesigner.xaml.cs
- DataBinding.cs
- SqlGatherProducedAliases.cs