Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / xsp / System / Web / Configuration / UrlMappingsSection.cs / 3 / 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; [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] 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. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ClipboardData.cs
- XmlnsDictionary.cs
- ServiceInstanceProvider.cs
- InputBinder.cs
- UiaCoreTypesApi.cs
- path.cs
- CodeConstructor.cs
- RectIndependentAnimationStorage.cs
- OptimalBreakSession.cs
- DisplayMemberTemplateSelector.cs
- Attributes.cs
- ReferenceConverter.cs
- XmlEventCache.cs
- BinaryObjectWriter.cs
- HtmlTextViewAdapter.cs
- FatalException.cs
- TrackingStringDictionary.cs
- RegionInfo.cs
- GorillaCodec.cs
- Expression.cs
- FormsAuthenticationUser.cs
- MetafileHeaderWmf.cs
- VirtualDirectoryMappingCollection.cs
- OverflowException.cs
- InvokeMemberBinder.cs
- XAMLParseException.cs
- DllNotFoundException.cs
- HttpRuntime.cs
- RSAOAEPKeyExchangeDeformatter.cs
- ForAllOperator.cs
- GrammarBuilderDictation.cs
- SvcFileManager.cs
- FontDialog.cs
- DoubleCollectionValueSerializer.cs
- NonDualMessageSecurityOverHttp.cs
- MemoryResponseElement.cs
- ButtonBase.cs
- DisplayMemberTemplateSelector.cs
- SqlTypeConverter.cs
- TagPrefixAttribute.cs
- WebConfigurationManager.cs
- PerformanceCounterPermissionEntryCollection.cs
- ComponentResourceManager.cs
- DrawingAttributeSerializer.cs
- NativeMethods.cs
- Buffer.cs
- DataGridViewCellCancelEventArgs.cs
- EventNotify.cs
- MultipleViewPatternIdentifiers.cs
- ProxyWebPart.cs
- ContainerParagraph.cs
- RoleGroup.cs
- xsdvalidator.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- CredentialCache.cs
- ClosableStream.cs
- InputReport.cs
- Codec.cs
- WebPartMenuStyle.cs
- _SpnDictionary.cs
- ObjRef.cs
- RowsCopiedEventArgs.cs
- ActivityExecutionFilter.cs
- WebControlAdapter.cs
- XPathCompileException.cs
- IndexerNameAttribute.cs
- SafeNativeMemoryHandle.cs
- XmlIterators.cs
- RequestStatusBarUpdateEventArgs.cs
- HttpResponseWrapper.cs
- SimpleLine.cs
- Visitors.cs
- StateDesignerConnector.cs
- PropertyEntry.cs
- EdmMember.cs
- ServerValidateEventArgs.cs
- QuaternionRotation3D.cs
- HttpAsyncResult.cs
- TimeoutHelper.cs
- VisualBasicSettingsConverter.cs
- PropertyDescriptorCollection.cs
- TextBlockAutomationPeer.cs
- ObfuscateAssemblyAttribute.cs
- VariableQuery.cs
- GeneralTransform3DCollection.cs
- ColorConvertedBitmap.cs
- SdlChannelSink.cs
- COM2AboutBoxPropertyDescriptor.cs
- UInt16.cs
- NumericExpr.cs
- _CookieModule.cs
- DataTableClearEvent.cs
- CodeCompiler.cs
- TextContainerChangeEventArgs.cs
- IgnoreFlushAndCloseStream.cs
- UrlParameterReader.cs
- Error.cs
- Stream.cs
- BamlTreeMap.cs
- ArrayConverter.cs