Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / xsp / System / Web / Configuration / UrlMappingsSection.cs / 1 / 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. // //----------------------------------------------------------------------------- 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- IRCollection.cs
- WindowsTab.cs
- DynamicMethod.cs
- MethodToken.cs
- Rights.cs
- PropertyInfoSet.cs
- CompilerInfo.cs
- DetailsViewInsertEventArgs.cs
- MDIControlStrip.cs
- DataGrid.cs
- storagemappingitemcollection.viewdictionary.cs
- PipelineModuleStepContainer.cs
- BaseDataBoundControl.cs
- FilteredDataSetHelper.cs
- DataObjectPastingEventArgs.cs
- BuilderInfo.cs
- Stackframe.cs
- ObservableCollection.cs
- QueryInterceptorAttribute.cs
- TraceLog.cs
- ZipIOModeEnforcingStream.cs
- HtmlInputRadioButton.cs
- ACL.cs
- ProjectionAnalyzer.cs
- TemplatedMailWebEventProvider.cs
- WebPartTransformer.cs
- WpfGeneratedKnownTypes.cs
- EmbeddedMailObjectsCollection.cs
- WebBrowserBase.cs
- BindingCollection.cs
- ContentPosition.cs
- JournalEntryStack.cs
- DataGridViewColumn.cs
- SynchronizedDispatch.cs
- CompositeCollectionView.cs
- GridViewColumnCollectionChangedEventArgs.cs
- TextRangeAdaptor.cs
- _Connection.cs
- X509RecipientCertificateServiceElement.cs
- DataGridColumnFloatingHeader.cs
- documentation.cs
- DataGridColumnDropSeparator.cs
- TrackingLocation.cs
- QilXmlReader.cs
- ProtocolsConfigurationEntry.cs
- GridViewRowEventArgs.cs
- Avt.cs
- StringArrayConverter.cs
- AdornerLayer.cs
- DataGridViewLayoutData.cs
- SchemaDeclBase.cs
- DtcInterfaces.cs
- XmlSchemaAny.cs
- XPathBinder.cs
- ObjectListField.cs
- HostingPreferredMapPath.cs
- LoginView.cs
- RequestCachePolicyConverter.cs
- RedirectionProxy.cs
- NativeMethods.cs
- oledbconnectionstring.cs
- SmtpClient.cs
- AutomationTextAttribute.cs
- Crypto.cs
- Debug.cs
- TextEndOfParagraph.cs
- KeyboardInputProviderAcquireFocusEventArgs.cs
- Sequence.cs
- InputScope.cs
- ResourcePropertyMemberCodeDomSerializer.cs
- ContentControl.cs
- IResourceProvider.cs
- VariableQuery.cs
- XmlNodeChangedEventManager.cs
- Rfc2898DeriveBytes.cs
- AdditionalEntityFunctions.cs
- Utils.cs
- SecurityContextKeyIdentifierClause.cs
- ObjectRef.cs
- DataGridItemCollection.cs
- Compiler.cs
- SrgsNameValueTag.cs
- FlowDocumentPaginator.cs
- IERequestCache.cs
- MouseActionConverter.cs
- RawMouseInputReport.cs
- DebugControllerThread.cs
- RelationshipConverter.cs
- OpenTypeLayout.cs
- LoginName.cs
- HtmlLink.cs
- CodeAssignStatement.cs
- ElementsClipboardData.cs
- DataSvcMapFileSerializer.cs
- DrawingContextDrawingContextWalker.cs
- NameScope.cs
- AuthenticationSection.cs
- Operand.cs
- ValueTypeFixupInfo.cs
- UrlMappingCollection.cs