Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / UrlMappingsSection.cs / 1305376 / UrlMappingsSection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Configuration { using System; using System.Xml; using System.Configuration; using System.Collections.Specialized; using System.Collections; using System.Globalization; using System.IO; using System.Text; using System.ComponentModel; using System.Web.Util; using System.Diagnostics; using System.Security.Permissions; public sealed class UrlMappingsSection : ConfigurationSection { private static ConfigurationPropertyCollection _properties; #region Property Declarations private static readonly ConfigurationProperty _propEnabled = new ConfigurationProperty("enabled", typeof(bool), true, ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propMappings = new ConfigurationProperty(null, typeof(UrlMappingCollection), null, ConfigurationPropertyOptions.IsDefaultCollection); #endregion static UrlMappingsSection() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propMappings); _properties.Add(_propEnabled); } protected override ConfigurationPropertyCollection Properties { get { return _properties; } } [ConfigurationProperty("", IsDefaultCollection = true)] public UrlMappingCollection UrlMappings { get { return (UrlMappingCollection)base[_propMappings]; } } [ConfigurationProperty("enabled", DefaultValue = true)] public bool IsEnabled { get { return (bool)base[_propEnabled]; } set { base[_propEnabled] = value; } } internal string HttpResolveMapping(string path) { string result = null; // Convert the 'path' param to be a relative path string relative = UrlPath.MakeVirtualPathAppRelative(path); // Look it up in our map UrlMapping elem = UrlMappings[relative]; if (elem != null) { result = elem.MappedUrl; } return result; } } } // 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
- TextModifier.cs
- TemplateInstanceAttribute.cs
- HtmlEmptyTagControlBuilder.cs
- CodeSnippetExpression.cs
- ServiceParser.cs
- SynchronousReceiveElement.cs
- StyleXamlParser.cs
- RequestQueue.cs
- DefaultHttpHandler.cs
- ValueTypeFieldReference.cs
- WebPartConnection.cs
- FormsIdentity.cs
- FolderBrowserDialog.cs
- elementinformation.cs
- SQLBytes.cs
- UiaCoreProviderApi.cs
- FatalException.cs
- MemberHolder.cs
- ProcessStartInfo.cs
- GridView.cs
- DataServiceQueryException.cs
- X509CertificateChain.cs
- RewritingSimplifier.cs
- SqlExpander.cs
- GridLengthConverter.cs
- RulePatternOps.cs
- WebPartConnection.cs
- HtmlMeta.cs
- DataControlFieldCell.cs
- CustomCategoryAttribute.cs
- BaseEntityWrapper.cs
- RequiredFieldValidator.cs
- TableRow.cs
- TextParaClient.cs
- Object.cs
- SqlCommandBuilder.cs
- EventWaitHandleSecurity.cs
- AsyncResult.cs
- InstanceCreationEditor.cs
- MouseEvent.cs
- EdmProviderManifest.cs
- DynamicDocumentPaginator.cs
- PowerStatus.cs
- Registry.cs
- Site.cs
- PersonalizableAttribute.cs
- SafeNativeMethods.cs
- ViewCellSlot.cs
- HeaderedContentControl.cs
- Emitter.cs
- SubqueryRules.cs
- CodePropertyReferenceExpression.cs
- SqlWriter.cs
- ThreadExceptionDialog.cs
- WebPartMovingEventArgs.cs
- TemplateLookupAction.cs
- x509store.cs
- RelOps.cs
- InteropAutomationProvider.cs
- CodeNamespaceImportCollection.cs
- RemoteWebConfigurationHost.cs
- TrailingSpaceComparer.cs
- SystemIPInterfaceStatistics.cs
- BamlLocalizationDictionary.cs
- WebRequestModuleElementCollection.cs
- ValidationErrorCollection.cs
- DesignerLoader.cs
- BinHexDecoder.cs
- ComPlusSynchronizationContext.cs
- BufferModesCollection.cs
- SharedPerformanceCounter.cs
- CompatibleIComparer.cs
- InteropBitmapSource.cs
- SizeChangedInfo.cs
- ScrollBarAutomationPeer.cs
- KeyInterop.cs
- BooleanExpr.cs
- SimpleExpression.cs
- SerialPort.cs
- WindowCollection.cs
- EpmSyndicationContentSerializer.cs
- DataSourceGroupCollection.cs
- PathGradientBrush.cs
- CodeSnippetTypeMember.cs
- SectionInput.cs
- SecurityContext.cs
- OdbcReferenceCollection.cs
- HandlerBase.cs
- ServiceRoute.cs
- SiteMap.cs
- Marshal.cs
- LinkUtilities.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- SqlPersonalizationProvider.cs
- SqlMethods.cs
- CellTreeNodeVisitors.cs
- ContractType.cs
- TextWriter.cs
- EnumMember.cs
- CustomCategoryAttribute.cs