Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / Configuration / ProtocolsConfiguration.cs / 1 / ProtocolsConfiguration.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Configuration { using System.IO; using System.Runtime.Serialization.Formatters; using System.Threading; using System.Runtime.InteropServices; using System.ComponentModel; using System.Collections; using System.Configuration; using System.Reflection; using System.Globalization; using System.Web.Hosting; using System.Web.Security; using System.Web.Util; using System.Xml; internal class ProtocolsConfiguration { private Hashtable _protocolEntries = new Hashtable(); internal ProtocolsConfiguration(XmlNode section) { // process XML section in order and apply the directives HandlerBase.CheckForUnrecognizedAttributes(section); foreach (XmlNode child in section.ChildNodes) { // skip whitespace and comments if (IsIgnorableAlsoCheckForNonElement(child)) continue; // processelements if (child.Name == "add") { String id = HandlerBase.RemoveRequiredAttribute(child, "id"); String phType = HandlerBase.RemoveRequiredAttribute(child, "processHandlerType"); String ahType = HandlerBase.RemoveRequiredAttribute(child, "appDomainHandlerType"); bool validate = true; HandlerBase.GetAndRemoveBooleanAttribute(child, "validate", ref validate); HandlerBase.CheckForUnrecognizedAttributes(child); HandlerBase.CheckForNonCommentChildNodes(child); // check duplicate Id /* TEMPORARY allow duplicates for easy Indigo machine.config update if (_protocolEntries[id] != null) { throw new ConfigurationErrorsException( SR.GetString(SR.Dup_protocol_id, id), child); } */ // add entry /* TEMPORARY hide errors and ignore bad tags to let breaking changes through */ try { _protocolEntries[id] = new ProtocolsConfigurationEntry( id, phType, ahType, validate, ConfigurationErrorsException.GetFilename(child), ConfigurationErrorsException.GetLineNumber(child)); } catch { } } else { HandlerBase.ThrowUnrecognizedElement(child); } } } private bool IsIgnorableAlsoCheckForNonElement(XmlNode node) { if (node.NodeType == XmlNodeType.Comment || node.NodeType == XmlNodeType.Whitespace) { return true; } if (node.NodeType != XmlNodeType.Element) { throw new ConfigurationErrorsException( SR.GetString(SR.Config_base_elements_only), node); } return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Configuration { using System.IO; using System.Runtime.Serialization.Formatters; using System.Threading; using System.Runtime.InteropServices; using System.ComponentModel; using System.Collections; using System.Configuration; using System.Reflection; using System.Globalization; using System.Web.Hosting; using System.Web.Security; using System.Web.Util; using System.Xml; internal class ProtocolsConfiguration { private Hashtable _protocolEntries = new Hashtable(); internal ProtocolsConfiguration(XmlNode section) { // process XML section in order and apply the directives HandlerBase.CheckForUnrecognizedAttributes(section); foreach (XmlNode child in section.ChildNodes) { // skip whitespace and comments if (IsIgnorableAlsoCheckForNonElement(child)) continue; // processelements if (child.Name == "add") { String id = HandlerBase.RemoveRequiredAttribute(child, "id"); String phType = HandlerBase.RemoveRequiredAttribute(child, "processHandlerType"); String ahType = HandlerBase.RemoveRequiredAttribute(child, "appDomainHandlerType"); bool validate = true; HandlerBase.GetAndRemoveBooleanAttribute(child, "validate", ref validate); HandlerBase.CheckForUnrecognizedAttributes(child); HandlerBase.CheckForNonCommentChildNodes(child); // check duplicate Id /* TEMPORARY allow duplicates for easy Indigo machine.config update if (_protocolEntries[id] != null) { throw new ConfigurationErrorsException( SR.GetString(SR.Dup_protocol_id, id), child); } */ // add entry /* TEMPORARY hide errors and ignore bad tags to let breaking changes through */ try { _protocolEntries[id] = new ProtocolsConfigurationEntry( id, phType, ahType, validate, ConfigurationErrorsException.GetFilename(child), ConfigurationErrorsException.GetLineNumber(child)); } catch { } } else { HandlerBase.ThrowUnrecognizedElement(child); } } } private bool IsIgnorableAlsoCheckForNonElement(XmlNode node) { if (node.NodeType == XmlNodeType.Comment || node.NodeType == XmlNodeType.Whitespace) { return true; } if (node.NodeType != XmlNodeType.Element) { throw new ConfigurationErrorsException( SR.GetString(SR.Config_base_elements_only), node); } return false; } } } // 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
- ListBoxChrome.cs
- Mouse.cs
- StylusCollection.cs
- XmlSerializerSection.cs
- DoubleLinkListEnumerator.cs
- OperationAbortedException.cs
- DropShadowBitmapEffect.cs
- WebPartDeleteVerb.cs
- PrimitiveXmlSerializers.cs
- PageStatePersister.cs
- WebPartAuthorizationEventArgs.cs
- StringComparer.cs
- COM2ExtendedBrowsingHandler.cs
- ExtentKey.cs
- ProxyWebPartManager.cs
- InvalidAsynchronousStateException.cs
- HashLookup.cs
- HtmlHistory.cs
- PreDigestedSignedInfo.cs
- EventLogEntry.cs
- LockCookie.cs
- _ScatterGatherBuffers.cs
- QueryInterceptorAttribute.cs
- Rotation3DKeyFrameCollection.cs
- InheritanceContextChangedEventManager.cs
- LightweightCodeGenerator.cs
- Interfaces.cs
- CodeAttributeDeclarationCollection.cs
- ClientBuildManager.cs
- ActiveXContainer.cs
- DefaultEventAttribute.cs
- DBSchemaRow.cs
- CngProvider.cs
- ZipFileInfo.cs
- WsatConfiguration.cs
- SQLGuid.cs
- EventHandlerList.cs
- DefaultValueConverter.cs
- ScriptingJsonSerializationSection.cs
- InplaceBitmapMetadataWriter.cs
- AbsoluteQuery.cs
- StringAnimationUsingKeyFrames.cs
- ToolStripItemTextRenderEventArgs.cs
- UnsafeNativeMethods.cs
- XamlBrushSerializer.cs
- SecurityTokenAuthenticator.cs
- HtmlSelect.cs
- TreeNodeBinding.cs
- BindingGraph.cs
- Control.cs
- TargetPerspective.cs
- ListViewGroupItemCollection.cs
- QuaternionAnimationBase.cs
- VideoDrawing.cs
- ProvideValueServiceProvider.cs
- _UriSyntax.cs
- AssociativeAggregationOperator.cs
- AmbientLight.cs
- UiaCoreTypesApi.cs
- DataGridLinkButton.cs
- AsyncDataRequest.cs
- ChangeProcessor.cs
- XmlChildNodes.cs
- hebrewshape.cs
- Line.cs
- PageRequestManager.cs
- Grant.cs
- GeometryGroup.cs
- CryptoStream.cs
- RegistryExceptionHelper.cs
- TransformGroup.cs
- ZipQueryOperator.cs
- DBConnectionString.cs
- RenderingBiasValidation.cs
- StandardCommands.cs
- Win32MouseDevice.cs
- ProcessInputEventArgs.cs
- AssemblyLoader.cs
- TaskCanceledException.cs
- MetadataFile.cs
- ObjectItemAttributeAssemblyLoader.cs
- PolyQuadraticBezierSegment.cs
- StringCollectionEditor.cs
- COAUTHIDENTITY.cs
- CatalogZoneDesigner.cs
- InputGestureCollection.cs
- Stopwatch.cs
- PointAnimationClockResource.cs
- Knowncolors.cs
- XmlAttributeOverrides.cs
- HttpApplicationFactory.cs
- CounterCreationDataCollection.cs
- GridItemCollection.cs
- ScrollItemProviderWrapper.cs
- KeyToListMap.cs
- MessageQuerySet.cs
- PostBackOptions.cs
- ContextMenu.cs
- XmlDataProvider.cs
- ActiveXContainer.cs