Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / Configuration / ProtocolsConfiguration.cs / 2 / 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; } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XsltArgumentList.cs
- ArrayEditor.cs
- ListView.cs
- XmlNavigatorStack.cs
- WindowsIPAddress.cs
- CheckedListBox.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- sqlcontext.cs
- FormatException.cs
- Win32SafeHandles.cs
- ContentType.cs
- ArgumentNullException.cs
- FullTrustAssembly.cs
- EmissiveMaterial.cs
- SingleStorage.cs
- SchemaEntity.cs
- URLMembershipCondition.cs
- oledbconnectionstring.cs
- EncryptedPackageFilter.cs
- XDRSchema.cs
- GenericXmlSecurityTokenAuthenticator.cs
- ArraySortHelper.cs
- IgnoreSectionHandler.cs
- WebPartManager.cs
- CorrelationHandle.cs
- NamespaceMapping.cs
- DockPatternIdentifiers.cs
- EntryIndex.cs
- HttpCookie.cs
- PixelShader.cs
- HostedTransportConfigurationBase.cs
- ManipulationDeltaEventArgs.cs
- OdbcRowUpdatingEvent.cs
- QuaternionAnimationBase.cs
- XMLSchema.cs
- XmlReflectionMember.cs
- ParameterInfo.cs
- TimelineCollection.cs
- DocumentSequence.cs
- ButtonField.cs
- ServiceReflector.cs
- TypeToArgumentTypeConverter.cs
- ReadOnlyDataSourceView.cs
- SchemaType.cs
- XsltSettings.cs
- AdapterUtil.cs
- ColumnCollection.cs
- FormClosingEvent.cs
- GradientStop.cs
- SelectionChangedEventArgs.cs
- SmiRecordBuffer.cs
- TraversalRequest.cs
- SqlMethodTransformer.cs
- OutputCacheProfileCollection.cs
- ContentDefinition.cs
- AttributeData.cs
- KnownTypeHelper.cs
- SHA256.cs
- BindingsCollection.cs
- XmlILAnnotation.cs
- ChannelHandler.cs
- BinaryCommonClasses.cs
- PriorityItem.cs
- Nullable.cs
- ResourceReferenceKeyNotFoundException.cs
- UpdatableGenericsFeature.cs
- IOException.cs
- DataGridColumnDropSeparator.cs
- ReadOnlyDataSource.cs
- StructuralCache.cs
- BooleanSwitch.cs
- DefaultTextStoreTextComposition.cs
- OracleDataAdapter.cs
- WSFederationHttpBinding.cs
- GcSettings.cs
- XPathEmptyIterator.cs
- InternalUserCancelledException.cs
- FindCriteriaCD1.cs
- TextAdaptor.cs
- VBCodeProvider.cs
- PlaceHolder.cs
- CodeArrayIndexerExpression.cs
- ProtocolsSection.cs
- BulletDecorator.cs
- ApplicationBuildProvider.cs
- RunInstallerAttribute.cs
- AccessDataSource.cs
- DataGridViewCheckBoxCell.cs
- AssemblyName.cs
- ProcessHost.cs
- COMException.cs
- BitmapEffect.cs
- Profiler.cs
- IndexerNameAttribute.cs
- XmlTextWriter.cs
- SerializeAbsoluteContext.cs
- HttpCachePolicyWrapper.cs
- AmbientValueAttribute.cs
- PrintPreviewDialog.cs