Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / Configuration / IISMapPath.cs / 3 / 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. //------------------------------------------------------------------------------ //// 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- User.cs
- RawAppCommandInputReport.cs
- ListViewItem.cs
- FamilyTypeface.cs
- BitmapScalingModeValidation.cs
- SqlCharStream.cs
- WorkflowTerminatedException.cs
- AttributeEmitter.cs
- Substitution.cs
- Int32RectValueSerializer.cs
- HtmlHead.cs
- FixedSOMTable.cs
- XsltArgumentList.cs
- GeneralTransform3DCollection.cs
- PartialClassGenerationTaskInternal.cs
- FormViewUpdatedEventArgs.cs
- ScrollBarAutomationPeer.cs
- Help.cs
- TextStore.cs
- DataTableNewRowEvent.cs
- JoinCqlBlock.cs
- SignedInfo.cs
- FamilyTypefaceCollection.cs
- Transform.cs
- CodeVariableDeclarationStatement.cs
- DefaultPropertyAttribute.cs
- ParentControlDesigner.cs
- HandlerMappingMemo.cs
- LineVisual.cs
- SmiContextFactory.cs
- SmiRecordBuffer.cs
- ReadOnlyHierarchicalDataSource.cs
- XmlSchemaSimpleTypeUnion.cs
- PersonalizationStateInfoCollection.cs
- Vector3DConverter.cs
- ConnectionInterfaceCollection.cs
- XPathNodeIterator.cs
- LineInfo.cs
- CodeNamespaceCollection.cs
- RoleGroupCollection.cs
- ProcessModuleCollection.cs
- PermissionAttributes.cs
- TrustManagerMoreInformation.cs
- StorageEntitySetMapping.cs
- ViewLoader.cs
- PartManifestEntry.cs
- BuildProviderAppliesToAttribute.cs
- ExternalFile.cs
- CompensatableTransactionScopeActivityDesigner.cs
- TreeIterators.cs
- DomNameTable.cs
- DataBoundControlAdapter.cs
- HandlerBase.cs
- MenuRendererClassic.cs
- PassportAuthenticationEventArgs.cs
- ScriptReferenceEventArgs.cs
- UMPAttributes.cs
- BuildResultCache.cs
- AdapterSwitches.cs
- PreloadedPackages.cs
- TranslateTransform3D.cs
- SafeLibraryHandle.cs
- DropSource.cs
- TemplateBamlRecordReader.cs
- SynchronizationContextHelper.cs
- ContextBase.cs
- ExtendedProtectionPolicyElement.cs
- StandardCommands.cs
- HashAlgorithm.cs
- EntitySet.cs
- AcceleratedTokenProvider.cs
- TimelineClockCollection.cs
- KeyValuePairs.cs
- OverflowException.cs
- AnonymousIdentificationModule.cs
- FixedDocumentPaginator.cs
- SymLanguageType.cs
- BufferedGraphics.cs
- CacheDependency.cs
- Transform3D.cs
- MimePart.cs
- EntityCodeGenerator.cs
- FlagsAttribute.cs
- BrushValueSerializer.cs
- PreviewKeyDownEventArgs.cs
- CommandField.cs
- BatchWriter.cs
- GlyphInfoList.cs
- CoreSwitches.cs
- WhileDesigner.xaml.cs
- PackageRelationshipCollection.cs
- Permission.cs
- LateBoundBitmapDecoder.cs
- ListBoxItemAutomationPeer.cs
- DataColumnMappingCollection.cs
- InkPresenter.cs
- AuthenticatedStream.cs
- TrackingWorkflowEventArgs.cs
- MimeXmlImporter.cs
- SHA512.cs