Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / Configuration / ProtocolsConfiguration.cs / 4 / 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
- FilterException.cs
- Matrix3D.cs
- XmlSchemaException.cs
- Baml6Assembly.cs
- ParameterElementCollection.cs
- ChannelSettingsElement.cs
- ObjectCache.cs
- UserValidatedEventArgs.cs
- Debugger.cs
- StateItem.cs
- UntrustedRecipientException.cs
- TraceEventCache.cs
- DesignTimeParseData.cs
- WebPermission.cs
- RayMeshGeometry3DHitTestResult.cs
- Tablet.cs
- LinqDataSourceContextEventArgs.cs
- WpfKnownType.cs
- ObjectQueryExecutionPlan.cs
- SystemWebExtensionsSectionGroup.cs
- Utils.cs
- AnonymousIdentificationSection.cs
- SqlTriggerAttribute.cs
- HttpConfigurationSystem.cs
- DependencyObjectProvider.cs
- BindingMAnagerBase.cs
- PerspectiveCamera.cs
- DbParameterCollection.cs
- SafeNativeMethods.cs
- TemplateEditingVerb.cs
- SmiXetterAccessMap.cs
- FolderBrowserDialog.cs
- FlowDocumentScrollViewer.cs
- TextLineBreak.cs
- DefaultPrintController.cs
- TheQuery.cs
- ObjectViewQueryResultData.cs
- Inline.cs
- WebServiceEnumData.cs
- Viewport2DVisual3D.cs
- CellTreeNodeVisitors.cs
- SmtpFailedRecipientException.cs
- ScriptHandlerFactory.cs
- Attributes.cs
- GcHandle.cs
- PublishLicense.cs
- DoWhileDesigner.xaml.cs
- SizeAnimationUsingKeyFrames.cs
- TimeIntervalCollection.cs
- Stack.cs
- HiddenFieldPageStatePersister.cs
- DataListItemCollection.cs
- IdentityManager.cs
- StorageSetMapping.cs
- ProfileService.cs
- Simplifier.cs
- OdbcConnectionFactory.cs
- TextAnchor.cs
- TypeToTreeConverter.cs
- DbProviderManifest.cs
- Viewport3DAutomationPeer.cs
- FixUpCollection.cs
- RequestResizeEvent.cs
- PropertyGridCommands.cs
- StatementContext.cs
- ToolboxItemCollection.cs
- OleDbDataReader.cs
- DeleteWorkflowOwnerCommand.cs
- XmlHierarchyData.cs
- wgx_commands.cs
- EmptyElement.cs
- SerializerWriterEventHandlers.cs
- LogicalExpr.cs
- DateTimePicker.cs
- ChannelFactoryRefCache.cs
- StyleConverter.cs
- TreeViewCancelEvent.cs
- SelectionWordBreaker.cs
- RegisteredArrayDeclaration.cs
- GPRECT.cs
- EntitySqlException.cs
- TransformFinalBlockRequest.cs
- SelectionRange.cs
- AnonymousIdentificationSection.cs
- X500Name.cs
- VariantWrapper.cs
- FaultDescription.cs
- CreateRefExpr.cs
- Timer.cs
- QilGenerator.cs
- Confirm.cs
- QilReplaceVisitor.cs
- DocumentXPathNavigator.cs
- HttpBindingExtension.cs
- InvalidComObjectException.cs
- SimpleLine.cs
- ExpressionWriter.cs
- Line.cs
- AttributeQuery.cs
- PerspectiveCamera.cs