Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- ComboBoxItem.cs
- DataSourceXmlSubItemAttribute.cs
- initElementDictionary.cs
- UrlMappingsModule.cs
- DataGridViewCellEventArgs.cs
- DecoderReplacementFallback.cs
- XmlWrappingWriter.cs
- GenericRootAutomationPeer.cs
- OrderByExpression.cs
- Vector3DConverter.cs
- xml.cs
- RowSpanVector.cs
- LocatorPart.cs
- LogSwitch.cs
- FlowDocumentView.cs
- SoapIgnoreAttribute.cs
- GuidelineCollection.cs
- BlurBitmapEffect.cs
- HighlightComponent.cs
- TextCompositionEventArgs.cs
- MsmqProcessProtocolHandler.cs
- SslStream.cs
- _UriSyntax.cs
- PointAnimationBase.cs
- X509ChainElement.cs
- JavaScriptString.cs
- SoapMessage.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- SizeConverter.cs
- IndexedEnumerable.cs
- DeferredReference.cs
- StrongName.cs
- AesManaged.cs
- PictureBox.cs
- RemoteWebConfigurationHostServer.cs
- WebReferenceCollection.cs
- TimeZone.cs
- DrawingImage.cs
- VirtualPathExtension.cs
- Exception.cs
- WebException.cs
- TemplatedAdorner.cs
- XPathNodeList.cs
- BuildProviderCollection.cs
- EntityDataSourceChangedEventArgs.cs
- Errors.cs
- ZipArchive.cs
- ElementHostPropertyMap.cs
- Panel.cs
- CorePropertiesFilter.cs
- ExpressionNode.cs
- SchemaImporter.cs
- RawTextInputReport.cs
- DropDownHolder.cs
- GlyphInfoList.cs
- DataColumnCollection.cs
- FormViewPagerRow.cs
- CustomPopupPlacement.cs
- AtomMaterializer.cs
- MemberAssignment.cs
- ProviderIncompatibleException.cs
- MainMenu.cs
- SelectedDatesCollection.cs
- Pen.cs
- ServiceInfo.cs
- ItemsControl.cs
- ChildDocumentBlock.cs
- ContainerActivationHelper.cs
- SettingsContext.cs
- ManagedFilter.cs
- JpegBitmapEncoder.cs
- ProgressBarRenderer.cs
- SizeValueSerializer.cs
- SocketCache.cs
- WindowsEditBox.cs
- BamlMapTable.cs
- FormsIdentity.cs
- XmlAnyElementAttribute.cs
- Graphics.cs
- Color.cs
- ValidatedControlConverter.cs
- SrgsSemanticInterpretationTag.cs
- Vars.cs
- SpeakCompletedEventArgs.cs
- PackWebResponse.cs
- InstanceNotReadyException.cs
- XamlReaderConstants.cs
- VideoDrawing.cs
- ClientScriptItemCollection.cs
- DataGridPagerStyle.cs
- CharacterHit.cs
- SpeechRecognizer.cs
- CodeTypeReferenceExpression.cs
- ArgIterator.cs
- PerformanceCounterManager.cs
- FontUnitConverter.cs
- WebReferencesBuildProvider.cs
- Int16KeyFrameCollection.cs
- CmsUtils.cs
- HandleCollector.cs