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
- ZoneButton.cs
- QueryOutputWriter.cs
- BatchParser.cs
- SendMailErrorEventArgs.cs
- BlockCollection.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- CodeTypeOfExpression.cs
- BamlResourceDeserializer.cs
- Block.cs
- RadialGradientBrush.cs
- RadioButtonBaseAdapter.cs
- XmlHierarchicalEnumerable.cs
- MobileUserControl.cs
- TdsValueSetter.cs
- odbcmetadatacollectionnames.cs
- DisplayMemberTemplateSelector.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- MapPathBasedVirtualPathProvider.cs
- ConfigXmlText.cs
- SystemNetHelpers.cs
- SiteMapDataSource.cs
- HtmlUtf8RawTextWriter.cs
- AndCondition.cs
- X509SecurityTokenProvider.cs
- DataStreamFromComStream.cs
- DataGridSortingEventArgs.cs
- GcHandle.cs
- PersonalizationDictionary.cs
- XmlSchemaSimpleTypeList.cs
- ValueTypeFixupInfo.cs
- GeneralTransformGroup.cs
- KeyedQueue.cs
- HtmlInputButton.cs
- CodeGotoStatement.cs
- CookieParameter.cs
- DataServiceConfiguration.cs
- GeometryDrawing.cs
- TaskFactory.cs
- SmuggledIUnknown.cs
- PageCodeDomTreeGenerator.cs
- ColumnMapCopier.cs
- MessageEncoder.cs
- GreenMethods.cs
- ECDiffieHellmanCngPublicKey.cs
- RootBrowserWindowAutomationPeer.cs
- UnionQueryOperator.cs
- InsufficientMemoryException.cs
- StringComparer.cs
- Win32NamedPipes.cs
- DiagnosticTrace.cs
- SmtpFailedRecipientsException.cs
- ExpressionConverter.cs
- IntegerFacetDescriptionElement.cs
- AttributeUsageAttribute.cs
- DeploymentSection.cs
- StaticFileHandler.cs
- TextEditorLists.cs
- VirtualDirectoryMappingCollection.cs
- OpacityConverter.cs
- AmbientLight.cs
- BindingList.cs
- QueueProcessor.cs
- ReceiveContext.cs
- InvalidateEvent.cs
- CompositeClientFormatter.cs
- InputMethod.cs
- MetadataItem_Static.cs
- WCFModelStrings.Designer.cs
- VisualCollection.cs
- SystemEvents.cs
- CodeNamespaceImportCollection.cs
- Module.cs
- IconConverter.cs
- ObjectDataSourceView.cs
- CurrencyWrapper.cs
- CacheOutputQuery.cs
- ScaleTransform.cs
- HighlightComponent.cs
- entityreference_tresulttype.cs
- RoleService.cs
- DataGridViewRowsAddedEventArgs.cs
- ReadOnlyDataSourceView.cs
- RegexCode.cs
- Exception.cs
- VarRemapper.cs
- ISO2022Encoding.cs
- compensatingcollection.cs
- SR.cs
- UIElement.cs
- HtmlElement.cs
- IPGlobalProperties.cs
- InstrumentationTracker.cs
- LowerCaseStringConverter.cs
- SecurityCriticalDataForSet.cs
- SpellerError.cs
- ConnectionStringsSection.cs
- SoapCodeExporter.cs
- DependencyObject.cs
- TakeOrSkipWhileQueryOperator.cs
- securitycriticaldataClass.cs