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
- NestPullup.cs
- CollectionContainer.cs
- PrintControllerWithStatusDialog.cs
- DescendentsWalker.cs
- XmlArrayItemAttribute.cs
- ComPlusThreadInitializer.cs
- SHA512Cng.cs
- DataControlFieldCollection.cs
- WSSecureConversationFeb2005.cs
- XmlSubtreeReader.cs
- ChildTable.cs
- SchemaTypeEmitter.cs
- CurrencyWrapper.cs
- DbParameterHelper.cs
- Transform.cs
- CompModSwitches.cs
- XPathChildIterator.cs
- GridViewRow.cs
- TypeForwardedFromAttribute.cs
- URL.cs
- XmlElementAttribute.cs
- Accessors.cs
- ObjectConverter.cs
- SafeNativeMethods.cs
- LinqDataSourceValidationException.cs
- WebPartVerbCollection.cs
- SqlStream.cs
- RequestTimeoutManager.cs
- DrawListViewColumnHeaderEventArgs.cs
- SrgsSubset.cs
- WindowsNonControl.cs
- ProviderIncompatibleException.cs
- EnumConverter.cs
- EmptyStringExpandableObjectConverter.cs
- MenuAdapter.cs
- StoreContentChangedEventArgs.cs
- NativeObjectSecurity.cs
- FileRecordSequence.cs
- BaseInfoTable.cs
- PageBreakRecord.cs
- RectangleConverter.cs
- CodeArrayIndexerExpression.cs
- SmiGettersStream.cs
- MaterialGroup.cs
- GridViewRow.cs
- SQLBytesStorage.cs
- WrappedReader.cs
- CompilationUtil.cs
- ConnectionStringsSection.cs
- XmlIgnoreAttribute.cs
- Utility.cs
- SafeArrayTypeMismatchException.cs
- VirtualDirectoryMappingCollection.cs
- NavigationWindow.cs
- NavigatingCancelEventArgs.cs
- SQLDateTime.cs
- Point3DCollectionConverter.cs
- OperationParameterInfoCollection.cs
- MetadataArtifactLoaderCompositeFile.cs
- TimelineClockCollection.cs
- NodeFunctions.cs
- _UriSyntax.cs
- ExceptionHandler.cs
- CodeValidator.cs
- CodeNamespace.cs
- Vector3DAnimationUsingKeyFrames.cs
- httpapplicationstate.cs
- WaitHandleCannotBeOpenedException.cs
- Command.cs
- HostProtectionPermission.cs
- Switch.cs
- CodeAssignStatement.cs
- DataBindingHandlerAttribute.cs
- DataProtection.cs
- SiteMapDataSourceView.cs
- FactoryRecord.cs
- ValueSerializer.cs
- InputMethodStateChangeEventArgs.cs
- DrawToolTipEventArgs.cs
- TriggerCollection.cs
- GridViewRowEventArgs.cs
- SQLInt16Storage.cs
- HttpModuleAction.cs
- OleDbCommand.cs
- DragEvent.cs
- DataPagerField.cs
- RegularExpressionValidator.cs
- Directory.cs
- SessionStateContainer.cs
- GroupStyle.cs
- DataSpaceManager.cs
- ScriptControl.cs
- GB18030Encoding.cs
- BindingBase.cs
- PermissionSetTriple.cs
- FontWeights.cs
- ExtensionSimplifierMarkupObject.cs
- MatrixCamera.cs
- ReaderWriterLockSlim.cs
- XmlNavigatorFilter.cs