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
- NameValueFileSectionHandler.cs
- InvokeDelegate.cs
- invalidudtexception.cs
- SchemaTypeEmitter.cs
- PointLight.cs
- _ServiceNameStore.cs
- Hashtable.cs
- DisplayNameAttribute.cs
- ShellProvider.cs
- Native.cs
- TreeNodeEventArgs.cs
- HGlobalSafeHandle.cs
- AuthenticateEventArgs.cs
- UIElementCollection.cs
- ClickablePoint.cs
- XamlBrushSerializer.cs
- SqlRemoveConstantOrderBy.cs
- HighlightVisual.cs
- HandlerMappingMemo.cs
- StreamedWorkflowDefinitionContext.cs
- _LazyAsyncResult.cs
- AgileSafeNativeMemoryHandle.cs
- UrlPath.cs
- ProviderBase.cs
- ZipIOLocalFileDataDescriptor.cs
- DependencyPropertyChangedEventArgs.cs
- Optimizer.cs
- EncoderParameter.cs
- FieldNameLookup.cs
- hresults.cs
- EntityViewGenerator.cs
- NegotiateStream.cs
- DefaultSerializationProviderAttribute.cs
- AsynchronousChannelMergeEnumerator.cs
- XhtmlBasicCalendarAdapter.cs
- DebuggerAttributes.cs
- RbTree.cs
- SecurityCriticalDataForSet.cs
- ChildTable.cs
- HandleDictionary.cs
- MachineKeySection.cs
- SQLInt16.cs
- EventsTab.cs
- ListViewDeletedEventArgs.cs
- ScriptServiceAttribute.cs
- DoubleAverageAggregationOperator.cs
- TileBrush.cs
- DependencySource.cs
- DelimitedListTraceListener.cs
- HtmlInputReset.cs
- ParallelTimeline.cs
- Baml2006ReaderContext.cs
- EntityModelSchemaGenerator.cs
- SoapIncludeAttribute.cs
- ColorContextHelper.cs
- PtsContext.cs
- StreamProxy.cs
- TimerElapsedEvenArgs.cs
- SuppressMessageAttribute.cs
- NumberFormatInfo.cs
- ImageClickEventArgs.cs
- RegexReplacement.cs
- SchemaImporter.cs
- XhtmlTextWriter.cs
- GridView.cs
- AddInAttribute.cs
- StringSource.cs
- GradientStop.cs
- HMACSHA1.cs
- _DomainName.cs
- X509CertificateCollection.cs
- PartialCachingAttribute.cs
- ProgressBarAutomationPeer.cs
- IteratorFilter.cs
- MultiByteCodec.cs
- loginstatus.cs
- PasswordRecovery.cs
- TextBoxAutomationPeer.cs
- AppDomainGrammarProxy.cs
- NullableFloatMinMaxAggregationOperator.cs
- CustomCategoryAttribute.cs
- ObjRef.cs
- AutomationProperties.cs
- WinEventTracker.cs
- linebase.cs
- FileInfo.cs
- SqlTriggerContext.cs
- SafeNativeMethods.cs
- GuidelineSet.cs
- SqlConnectionHelper.cs
- XmlIlVisitor.cs
- ImageResources.Designer.cs
- FrameworkElementFactoryMarkupObject.cs
- DataGridViewHeaderCell.cs
- LogSwitch.cs
- WebPartDisplayModeCancelEventArgs.cs
- XmlSignatureManifest.cs
- SourceElementsCollection.cs
- SuppressIldasmAttribute.cs
- ListBase.cs