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
- SymbolTable.cs
- SqlDataSourceSelectingEventArgs.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- MulticastOption.cs
- RangeBase.cs
- Material.cs
- SqlTriggerContext.cs
- StateMachine.cs
- MetadataArtifactLoader.cs
- EventLogger.cs
- ContextMenu.cs
- IPEndPointCollection.cs
- MatrixStack.cs
- ToolBarOverflowPanel.cs
- IItemProperties.cs
- ResourceContainer.cs
- OleCmdHelper.cs
- XmlSchemaSimpleContent.cs
- ZoneMembershipCondition.cs
- XPathAncestorIterator.cs
- SystemColorTracker.cs
- FusionWrap.cs
- EntityViewGenerationAttribute.cs
- XsdDataContractImporter.cs
- SessionPageStatePersister.cs
- SessionStateModule.cs
- HtmlTableRow.cs
- DataTableTypeConverter.cs
- DirectoryRedirect.cs
- Shape.cs
- CircleHotSpot.cs
- GcHandle.cs
- printdlgexmarshaler.cs
- AQNBuilder.cs
- ColorKeyFrameCollection.cs
- MaterialGroup.cs
- ExchangeUtilities.cs
- EntityDataSourceSelectedEventArgs.cs
- ColumnCollection.cs
- QueryTaskGroupState.cs
- JavaScriptString.cs
- RadioButtonList.cs
- ScopeElementCollection.cs
- DesigntimeLicenseContextSerializer.cs
- SqlConnectionPoolGroupProviderInfo.cs
- Guid.cs
- QilXmlReader.cs
- HGlobalSafeHandle.cs
- WindowHideOrCloseTracker.cs
- MarkedHighlightComponent.cs
- PolicyException.cs
- SessionEndingCancelEventArgs.cs
- DecoderExceptionFallback.cs
- RawAppCommandInputReport.cs
- RedirectionProxy.cs
- XpsResourceDictionary.cs
- EvidenceBase.cs
- ParagraphVisual.cs
- CultureTable.cs
- StyleHelper.cs
- UIElement3D.cs
- VisualTreeHelper.cs
- AssociationEndMember.cs
- DataColumnMapping.cs
- NavigationFailedEventArgs.cs
- PaperSize.cs
- ListenerAdaptersInstallComponent.cs
- X509Chain.cs
- XPathSelfQuery.cs
- OutputScopeManager.cs
- X509ServiceCertificateAuthenticationElement.cs
- GridItemPattern.cs
- PageBuildProvider.cs
- CacheSection.cs
- WFItemsToSpacerVisibility.cs
- GridViewDesigner.cs
- CompositionTarget.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- XsltLoader.cs
- HMAC.cs
- PropertyPath.cs
- ProfileGroupSettingsCollection.cs
- ACE.cs
- XmlSchemaExporter.cs
- WebPartConnectionsConnectVerb.cs
- GridViewPageEventArgs.cs
- WeakRefEnumerator.cs
- DataKey.cs
- ContainerParagraph.cs
- ConfigurationStrings.cs
- DynamicPropertyHolder.cs
- SettingsPropertyWrongTypeException.cs
- XmlSerializerAssemblyAttribute.cs
- XmlSchemaComplexContentExtension.cs
- FragmentNavigationEventArgs.cs
- AppearanceEditorPart.cs
- ComponentDispatcher.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- mansign.cs
- GregorianCalendar.cs