Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / Configuration / HttpHandlersSection.cs / 4 / HttpHandlersSection.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.IO; using System.Text; using System.Web.Util; using System.Web.Compilation; using System.Globalization; using System.Security.Permissions; [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class HttpHandlersSection : ConfigurationSection { private static ConfigurationPropertyCollection _properties; private static readonly ConfigurationProperty _propHandlers = new ConfigurationProperty(null, typeof(HttpHandlerActionCollection), null, ConfigurationPropertyOptions.IsDefaultCollection); private bool _validated; static HttpHandlersSection() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propHandlers); } public HttpHandlersSection() { } protected override ConfigurationPropertyCollection Properties { get { return _properties; } } [ConfigurationProperty("", IsDefaultCollection = true)] public HttpHandlerActionCollection Handlers { get { return (HttpHandlerActionCollection)base[_propHandlers]; } } internal bool ValidateHandlers() { if (!_validated) { lock (this) { if (!_validated) { foreach (HttpHandlerAction ha in Handlers) { ha.InitValidateInternal(); } _validated = true; } } } return _validated; } internal HttpHandlerAction FindMapping(String verb, VirtualPath path) { ValidateHandlers(); for (int i = 0; i < Handlers.Count; i++) { HttpHandlerAction m = (HttpHandlerAction)Handlers[i]; if (m.IsMatch(verb, path)) { return m; } } return null; } } } // 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; using System.Xml; using System.Configuration; using System.Collections.Specialized; using System.Collections; using System.IO; using System.Text; using System.Web.Util; using System.Web.Compilation; using System.Globalization; using System.Security.Permissions; [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class HttpHandlersSection : ConfigurationSection { private static ConfigurationPropertyCollection _properties; private static readonly ConfigurationProperty _propHandlers = new ConfigurationProperty(null, typeof(HttpHandlerActionCollection), null, ConfigurationPropertyOptions.IsDefaultCollection); private bool _validated; static HttpHandlersSection() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propHandlers); } public HttpHandlersSection() { } protected override ConfigurationPropertyCollection Properties { get { return _properties; } } [ConfigurationProperty("", IsDefaultCollection = true)] public HttpHandlerActionCollection Handlers { get { return (HttpHandlerActionCollection)base[_propHandlers]; } } internal bool ValidateHandlers() { if (!_validated) { lock (this) { if (!_validated) { foreach (HttpHandlerAction ha in Handlers) { ha.InitValidateInternal(); } _validated = true; } } } return _validated; } internal HttpHandlerAction FindMapping(String verb, VirtualPath path) { ValidateHandlers(); for (int i = 0; i < Handlers.Count; i++) { HttpHandlerAction m = (HttpHandlerAction)Handlers[i]; if (m.IsMatch(verb, path)) { return m; } } return null; } } } // 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
- ProtocolException.cs
- ColumnWidthChangedEvent.cs
- ToolBarButtonClickEvent.cs
- ComplexBindingPropertiesAttribute.cs
- Perspective.cs
- AutomationPattern.cs
- OleDbCommand.cs
- ParameterInfo.cs
- Simplifier.cs
- DBCSCodePageEncoding.cs
- UxThemeWrapper.cs
- DPTypeDescriptorContext.cs
- InheritanceUI.cs
- HttpCookie.cs
- CreateUserWizard.cs
- DataGridItem.cs
- AssemblyInfo.cs
- DockPattern.cs
- MSAAWinEventWrap.cs
- SmiContext.cs
- HtmlInputPassword.cs
- DBSchemaRow.cs
- Timeline.cs
- ToolStripPanelRow.cs
- Misc.cs
- Crc32.cs
- EditCommandColumn.cs
- SiteMap.cs
- SpecialNameAttribute.cs
- RightsManagementEncryptionTransform.cs
- RewritingSimplifier.cs
- DefaultTextStore.cs
- Convert.cs
- ColorIndependentAnimationStorage.cs
- KnownIds.cs
- SimpleHandlerBuildProvider.cs
- SafeNativeMethodsMilCoreApi.cs
- SlotInfo.cs
- IssuedTokenClientElement.cs
- AssemblyCacheEntry.cs
- _SafeNetHandles.cs
- HttpHandler.cs
- ResXResourceWriter.cs
- SegmentTree.cs
- AxHost.cs
- MetaChildrenColumn.cs
- Set.cs
- UInt64.cs
- Emitter.cs
- TraceHandler.cs
- exports.cs
- TypeDelegator.cs
- BatchWriter.cs
- WrappedReader.cs
- SqlEnums.cs
- DetailsViewRow.cs
- ListenerElementsCollection.cs
- SiteMapDataSourceDesigner.cs
- SqlDependencyListener.cs
- WebRequestModulesSection.cs
- DesignTimeVisibleAttribute.cs
- updatecommandorderer.cs
- TableRow.cs
- HttpWebResponse.cs
- COM2Properties.cs
- OdbcPermission.cs
- ExtentKey.cs
- ToolStripGripRenderEventArgs.cs
- AccessControlEntry.cs
- RoutedEventValueSerializer.cs
- PropertyCollection.cs
- HtmlContainerControl.cs
- MatrixTransform3D.cs
- MobileErrorInfo.cs
- CompositeTypefaceMetrics.cs
- XmlSchemaAppInfo.cs
- EntityDataSourceViewSchema.cs
- TextRange.cs
- SendAgentStatusRequest.cs
- SourceItem.cs
- EventLogHandle.cs
- OleDbRowUpdatedEvent.cs
- ArraySubsetEnumerator.cs
- X509Certificate.cs
- RotateTransform3D.cs
- SynchronizationLockException.cs
- ConnectivityStatus.cs
- PostBackTrigger.cs
- SqlExpressionNullability.cs
- metadatamappinghashervisitor.cs
- SystemEvents.cs
- FrameworkElement.cs
- DynamicPropertyReader.cs
- StatusBarDrawItemEvent.cs
- ACE.cs
- LogSwitch.cs
- Point3DAnimation.cs
- SQLMoneyStorage.cs
- ImmComposition.cs
- TaskHelper.cs