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
- DbgCompiler.cs
- BaseCodePageEncoding.cs
- FacetValues.cs
- SrgsRulesCollection.cs
- MultipleViewProviderWrapper.cs
- Helpers.cs
- GlobalDataBindingHandler.cs
- InternalConfigSettingsFactory.cs
- FileDialogPermission.cs
- FragmentNavigationEventArgs.cs
- FlowLayoutSettings.cs
- DispatchChannelSink.cs
- NullableIntMinMaxAggregationOperator.cs
- ToRequest.cs
- CodeTypeMember.cs
- CloudCollection.cs
- DbQueryCommandTree.cs
- XmlSchemaComplexContent.cs
- ScalarOps.cs
- EditingMode.cs
- EventLogException.cs
- FacetChecker.cs
- PasswordBox.cs
- NamespaceMapping.cs
- DynamicFilterExpression.cs
- ToolstripProfessionalRenderer.cs
- MenuEventArgs.cs
- FixedSOMLineRanges.cs
- PersonalizationDictionary.cs
- PartBasedPackageProperties.cs
- SafeArchiveContext.cs
- StandardOleMarshalObject.cs
- ISCIIEncoding.cs
- ThreadExceptionEvent.cs
- SinglePageViewer.cs
- DisplayClaim.cs
- TrustManagerPromptUI.cs
- ScrollChrome.cs
- NullableConverter.cs
- Transform3D.cs
- PropertyChange.cs
- WsdlBuildProvider.cs
- SerializableTypeCodeDomSerializer.cs
- Logging.cs
- Ipv6Element.cs
- UnaryQueryOperator.cs
- mactripleDES.cs
- xmlformatgeneratorstatics.cs
- MultilineStringConverter.cs
- SID.cs
- FixedTextSelectionProcessor.cs
- HttpRawResponse.cs
- SupportingTokenDuplexChannel.cs
- ASCIIEncoding.cs
- XmlSubtreeReader.cs
- RewritingValidator.cs
- MarshalByRefObject.cs
- MasterPage.cs
- CategoryGridEntry.cs
- Missing.cs
- SQLMoneyStorage.cs
- SessionStateUtil.cs
- TraceHelpers.cs
- SuppressedPackageProperties.cs
- LinqDataView.cs
- TreeChangeInfo.cs
- BaseDataList.cs
- BindingOperations.cs
- GeometryModel3D.cs
- ASCIIEncoding.cs
- FilterQuery.cs
- Authorization.cs
- SchemaConstraints.cs
- TextSpanModifier.cs
- WebPartEditorOkVerb.cs
- CodeNamespaceImportCollection.cs
- ThicknessAnimation.cs
- XmlElementAttributes.cs
- DesignerActionHeaderItem.cs
- CustomAttribute.cs
- GlyphRun.cs
- DirectoryLocalQuery.cs
- _DisconnectOverlappedAsyncResult.cs
- JumpPath.cs
- RegistryExceptionHelper.cs
- SQLDouble.cs
- ProtocolsSection.cs
- GridViewAutomationPeer.cs
- PeerNameRegistration.cs
- PrePostDescendentsWalker.cs
- StringUtil.cs
- MemberHolder.cs
- ContextMenuStrip.cs
- AssociationProvider.cs
- MatcherBuilder.cs
- BackEase.cs
- Util.cs
- AnchoredBlock.cs
- TransformValueSerializer.cs
- Transform3DGroup.cs