Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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); // /* 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Processor.cs
- StatusBarAutomationPeer.cs
- TextTreeNode.cs
- LocatorBase.cs
- MergeFailedEvent.cs
- EpmCustomContentDeSerializer.cs
- BoolExpr.cs
- HtmlHistory.cs
- MaxSessionCountExceededException.cs
- SetIterators.cs
- MultiTouchSystemGestureLogic.cs
- HtmlInputHidden.cs
- PageAdapter.cs
- FileDataSourceCache.cs
- WebPartConnectionsCancelEventArgs.cs
- Dump.cs
- HostedHttpRequestAsyncResult.cs
- BevelBitmapEffect.cs
- WindowsListViewGroup.cs
- TreeNodeEventArgs.cs
- XsltException.cs
- BindingSource.cs
- CompilerGlobalScopeAttribute.cs
- Timeline.cs
- DecimalStorage.cs
- ChtmlCalendarAdapter.cs
- EdgeModeValidation.cs
- TabControlAutomationPeer.cs
- ProtocolsConfiguration.cs
- TextDocumentView.cs
- ProfileParameter.cs
- SafeSerializationManager.cs
- DataControlFieldCell.cs
- ExpressionTextBox.xaml.cs
- DisposableCollectionWrapper.cs
- Control.cs
- SecurityUniqueId.cs
- TextUtf8RawTextWriter.cs
- ToolStripContentPanel.cs
- CellCreator.cs
- EnumValidator.cs
- ListViewTableCell.cs
- XmlIgnoreAttribute.cs
- EntityConnectionStringBuilder.cs
- AsymmetricAlgorithm.cs
- OperationAbortedException.cs
- LocalizationCodeDomSerializer.cs
- documentsequencetextpointer.cs
- XamlUtilities.cs
- MenuStrip.cs
- GridViewRowEventArgs.cs
- SequenceNumber.cs
- IisTraceListener.cs
- EmptyEnumerable.cs
- StorageScalarPropertyMapping.cs
- TriggerActionCollection.cs
- DataControlButton.cs
- AspNetHostingPermission.cs
- BitVector32.cs
- CalculatedColumn.cs
- ColorConverter.cs
- NotFiniteNumberException.cs
- BindingsCollection.cs
- SqlTypeSystemProvider.cs
- CookielessHelper.cs
- MobileControl.cs
- DesignTimeData.cs
- CodeAttributeArgumentCollection.cs
- HealthMonitoringSectionHelper.cs
- SqlNotificationRequest.cs
- CaseInsensitiveHashCodeProvider.cs
- ShortcutKeysEditor.cs
- DesignerProperties.cs
- TimeIntervalCollection.cs
- DataSourceXmlClassAttribute.cs
- _KerberosClient.cs
- __ConsoleStream.cs
- ConfigXmlSignificantWhitespace.cs
- KeyValuePairs.cs
- Membership.cs
- SHA1.cs
- BitVector32.cs
- DataBindingHandlerAttribute.cs
- WindowsScrollBar.cs
- ListMarkerLine.cs
- PriorityItem.cs
- DecoderExceptionFallback.cs
- PreviewControlDesigner.cs
- DataGridViewComboBoxEditingControl.cs
- GridItemCollection.cs
- DesignerMetadata.cs
- FilterException.cs
- PropertyDescriptorCollection.cs
- SoapSchemaImporter.cs
- Decorator.cs
- DataFormats.cs
- FilteredReadOnlyMetadataCollection.cs
- recordstatefactory.cs
- WebPartDeleteVerb.cs
- ConnectionStringsSection.cs