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
- ComboBoxAutomationPeer.cs
- AssemblyCache.cs
- ContentWrapperAttribute.cs
- Models.cs
- SynchronizedReadOnlyCollection.cs
- CompoundFileReference.cs
- CompositionAdorner.cs
- GridViewSortEventArgs.cs
- Opcode.cs
- MutexSecurity.cs
- DocumentApplicationState.cs
- ReadOnlyObservableCollection.cs
- MetadataImporter.cs
- VirtualPathExtension.cs
- AllowedAudienceUriElement.cs
- NamespaceCollection.cs
- RadioButtonAutomationPeer.cs
- DesignerForm.cs
- IndexerNameAttribute.cs
- RoleManagerSection.cs
- mediaclock.cs
- Classification.cs
- LinqToSqlWrapper.cs
- AtomServiceDocumentSerializer.cs
- ThreadStateException.cs
- TabItemWrapperAutomationPeer.cs
- MSAAEventDispatcher.cs
- DataServiceRequestException.cs
- TagNameToTypeMapper.cs
- PropertyNames.cs
- TextUtf8RawTextWriter.cs
- InstanceValue.cs
- SchemaTypeEmitter.cs
- DataGridTable.cs
- PartialTrustVisibleAssembliesSection.cs
- TextTreeUndoUnit.cs
- ReadOnlyHierarchicalDataSource.cs
- DBCSCodePageEncoding.cs
- GridPattern.cs
- NativeCppClassAttribute.cs
- AssertValidation.cs
- KeyMatchBuilder.cs
- SafeArrayRankMismatchException.cs
- KeyValueConfigurationElement.cs
- RegexRunnerFactory.cs
- XmlSchemaSimpleType.cs
- ContentTypeSettingDispatchMessageFormatter.cs
- InvalidOleVariantTypeException.cs
- ElementProxy.cs
- FileDialog_Vista.cs
- Event.cs
- SoapCodeExporter.cs
- BackgroundFormatInfo.cs
- LinkTarget.cs
- SmtpAuthenticationManager.cs
- DynamicValidator.cs
- DecoderBestFitFallback.cs
- ProxyWebPartConnectionCollection.cs
- SqlGatherProducedAliases.cs
- MailWriter.cs
- BoundConstants.cs
- TextParagraphProperties.cs
- TdsParserSessionPool.cs
- _SpnDictionary.cs
- OdbcError.cs
- QueryResponse.cs
- NgenServicingAttributes.cs
- _Semaphore.cs
- WinEventQueueItem.cs
- CachedTypeface.cs
- ControlCachePolicy.cs
- VScrollProperties.cs
- XmlAnyElementAttributes.cs
- LocatorGroup.cs
- InternalsVisibleToAttribute.cs
- TreeBuilderBamlTranslator.cs
- TabControlEvent.cs
- ApplicationSecurityManager.cs
- RenameRuleObjectDialog.Designer.cs
- XmlTextReaderImpl.cs
- ButtonBaseAutomationPeer.cs
- MessageSmuggler.cs
- Directory.cs
- ToolBar.cs
- NonVisualControlAttribute.cs
- COM2Enum.cs
- AttachedProperty.cs
- ImageSourceValueSerializer.cs
- Point3DAnimation.cs
- TransformFinalBlockRequest.cs
- TypeNameParser.cs
- Int32CAMarshaler.cs
- SqlConnectionPoolProviderInfo.cs
- Font.cs
- CodeCommentStatementCollection.cs
- MimeParameterWriter.cs
- HostExecutionContextManager.cs
- SafePointer.cs
- SerialErrors.cs
- ToolstripProfessionalRenderer.cs