Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / Configuration / HttpHandlersSection.cs / 5 / 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. // //----------------------------------------------------------------------------- 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlJsonReader.cs
- EntitySet.cs
- BrowserCapabilitiesFactoryBase.cs
- ApplicationServicesHostFactory.cs
- EmptyEnumerable.cs
- Registration.cs
- SingleResultAttribute.cs
- XmlProcessingInstruction.cs
- SplashScreenNativeMethods.cs
- XPathConvert.cs
- DocumentCollection.cs
- PointAnimationClockResource.cs
- AutomationElement.cs
- SynchronizedInputPattern.cs
- RequiredFieldValidator.cs
- WindowsPrincipal.cs
- XmlSignificantWhitespace.cs
- DXD.cs
- InternalResources.cs
- RangeBase.cs
- Error.cs
- ColorAnimation.cs
- TCEAdapterGenerator.cs
- TextCompositionEventArgs.cs
- ReferenceService.cs
- PeerEndPoint.cs
- AsymmetricKeyExchangeDeformatter.cs
- DataBoundControlHelper.cs
- ResourcesChangeInfo.cs
- CounterSetInstance.cs
- VectorAnimationUsingKeyFrames.cs
- DataSourceControlBuilder.cs
- RemoteCryptoSignHashRequest.cs
- TableRowGroupCollection.cs
- formatter.cs
- ScrollBar.cs
- CardSpaceSelector.cs
- OdbcStatementHandle.cs
- GeneralTransform.cs
- ChannelDispatcherCollection.cs
- BitmapEffectDrawing.cs
- counter.cs
- XPathPatternBuilder.cs
- PageThemeBuildProvider.cs
- Tracer.cs
- ScrollPattern.cs
- ArrayConverter.cs
- XmlNodeWriter.cs
- XmlObjectSerializerContext.cs
- ToolBarPanel.cs
- PageTheme.cs
- PeerNameRecordCollection.cs
- SqlDataSourceStatusEventArgs.cs
- ConcurrentQueue.cs
- PolicyException.cs
- GeneratedContractType.cs
- DataService.cs
- Schema.cs
- Identifier.cs
- PKCS1MaskGenerationMethod.cs
- StaticContext.cs
- SparseMemoryStream.cs
- RtfControlWordInfo.cs
- CngKeyCreationParameters.cs
- ToolboxItemSnapLineBehavior.cs
- GridViewRowCollection.cs
- TextProviderWrapper.cs
- SystemInfo.cs
- Debug.cs
- Int64Animation.cs
- ErrorWrapper.cs
- BufferBuilder.cs
- MD5.cs
- dataprotectionpermission.cs
- EntityDataSourceChangingEventArgs.cs
- SimpleTypeResolver.cs
- OleDbPropertySetGuid.cs
- RelationshipManager.cs
- COM2PropertyBuilderUITypeEditor.cs
- SerialReceived.cs
- ScrollableControl.cs
- PolyBezierSegment.cs
- UseAttributeSetsAction.cs
- StoryFragments.cs
- ZipIOExtraFieldElement.cs
- VSWCFServiceContractGenerator.cs
- FilteredDataSetHelper.cs
- KeyValueInternalCollection.cs
- DispatcherObject.cs
- BuildDependencySet.cs
- PerformanceCounterPermission.cs
- XmlSchemaValidationException.cs
- DataList.cs
- Socket.cs
- WebPartVerbCollection.cs
- CustomErrorsSectionWrapper.cs
- GeometryConverter.cs
- EventArgs.cs
- BitmapMetadataBlob.cs
- DurableInstanceManager.cs