Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / Configuration / IISMapPath.cs / 1 / 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
- EntityDataSourceValidationException.cs
- GenericNameHandler.cs
- DockingAttribute.cs
- CaseInsensitiveOrdinalStringComparer.cs
- PolicyLevel.cs
- Int16KeyFrameCollection.cs
- PenLineJoinValidation.cs
- QuaternionAnimationBase.cs
- SqlMethodTransformer.cs
- OleDbRowUpdatedEvent.cs
- WeakReferenceKey.cs
- SiteMapHierarchicalDataSourceView.cs
- MeshGeometry3D.cs
- NamedPipeConnectionPoolSettingsElement.cs
- CapabilitiesPattern.cs
- Int32RectConverter.cs
- SeekStoryboard.cs
- BoundPropertyEntry.cs
- BitmapDownload.cs
- PathData.cs
- FileEnumerator.cs
- ServiceMetadataExtension.cs
- Composition.cs
- MarkupCompilePass2.cs
- HtmlElementErrorEventArgs.cs
- StatusBarItem.cs
- ServerValidateEventArgs.cs
- LassoHelper.cs
- Timeline.cs
- TypedTableBase.cs
- ResourceDescriptionAttribute.cs
- HtmlToClrEventProxy.cs
- DataGridViewMethods.cs
- GridSplitter.cs
- SerializerProvider.cs
- RNGCryptoServiceProvider.cs
- PeerOutputChannel.cs
- RegexParser.cs
- AssociationSet.cs
- EndpointBehaviorElement.cs
- LightweightCodeGenerator.cs
- StateItem.cs
- DynamicMethod.cs
- ColumnTypeConverter.cs
- DesignerForm.cs
- DataControlButton.cs
- XmlSubtreeReader.cs
- SignatureResourcePool.cs
- Matrix.cs
- SynchronizationHandlesCodeDomSerializer.cs
- SHA1CryptoServiceProvider.cs
- InvalidFilterCriteriaException.cs
- SecurityManager.cs
- SafeEventHandle.cs
- MsmqInputMessage.cs
- SelectManyQueryOperator.cs
- MutexSecurity.cs
- XmlProcessingInstruction.cs
- XmlDataProvider.cs
- SqlTriggerAttribute.cs
- _ServiceNameStore.cs
- EntityDataSourceViewSchema.cs
- OleDbPropertySetGuid.cs
- EndCreateSecurityTokenRequest.cs
- EnvelopedPkcs7.cs
- OracleParameterCollection.cs
- SQLResource.cs
- DocumentApplicationJournalEntry.cs
- GetPageNumberCompletedEventArgs.cs
- PersonalizationStateInfo.cs
- MetadataItem_Static.cs
- ResizingMessageFilter.cs
- altserialization.cs
- UnauthorizedWebPart.cs
- StringValidatorAttribute.cs
- EditorZoneAutoFormat.cs
- WindowInteractionStateTracker.cs
- ContentType.cs
- CompilerWrapper.cs
- XsltContext.cs
- __ComObject.cs
- Walker.cs
- AssemblySettingAttributes.cs
- CharEntityEncoderFallback.cs
- OraclePermissionAttribute.cs
- _SSPISessionCache.cs
- Matrix3DValueSerializer.cs
- Timer.cs
- GlyphRunDrawing.cs
- Policy.cs
- WaveHeader.cs
- ExecutionPropertyManager.cs
- PasswordRecoveryAutoFormat.cs
- SecondaryIndexDefinition.cs
- ConfigXmlElement.cs
- CreateUserWizard.cs
- SudsCommon.cs
- WindowClosedEventArgs.cs
- AssociationTypeEmitter.cs
- activationcontext.cs