Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Data / System / Data / Common / HandlerBase.cs / 1305376 / HandlerBase.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data.Common { using System; using System.Collections; using System.Configuration; using System.Diagnostics; using System.Globalization; using System.Xml; internal static class HandlerBase { static internal void CheckForChildNodes(XmlNode node) { if (node.HasChildNodes) { throw ADP.ConfigBaseNoChildNodes(node.FirstChild); } } static private void CheckForNonElement(XmlNode node) { if (XmlNodeType.Element != node.NodeType) { throw ADP.ConfigBaseElementsOnly(node); } } static internal void CheckForUnrecognizedAttributes(XmlNode node) { if (0 != node.Attributes.Count) { throw ADP.ConfigUnrecognizedAttributes(node); } } // skip whitespace and comments, throws if non-element static internal bool IsIgnorableAlsoCheckForNonElement(XmlNode node) { if ((XmlNodeType.Comment == node.NodeType) || (XmlNodeType.Whitespace == node.NodeType)) { return true; } CheckForNonElement(node); return false; } static internal string RemoveAttribute(XmlNode node, string name, bool required, bool allowEmpty) { XmlNode attribute = node.Attributes.RemoveNamedItem(name); if (null == attribute) { if (required) { throw ADP.ConfigRequiredAttributeMissing(name, node); } return null; } string value = attribute.Value; if (!allowEmpty && (0 == value.Length)) { throw ADP.ConfigRequiredAttributeEmpty(name, node); } return value; } static internal DataSet CloneParent(DataSet parentConfig, bool insenstive) { if (null == parentConfig) { parentConfig = new DataSet(DbProviderFactoriesConfigurationHandler.sectionName); parentConfig.CaseSensitive = !insenstive; parentConfig.Locale = CultureInfo.InvariantCulture; } else { parentConfig = parentConfig.Copy(); } return parentConfig; } } } // 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
- RadioButton.cs
- ReferencedType.cs
- SecurityManager.cs
- RemotingConfiguration.cs
- LinqExpressionNormalizer.cs
- ObjectResult.cs
- TextMessageEncodingBindingElement.cs
- MulticastIPAddressInformationCollection.cs
- externdll.cs
- ApplicationTrust.cs
- HostingEnvironment.cs
- Point3DAnimation.cs
- XmlSecureResolver.cs
- CipherData.cs
- OleDbStruct.cs
- SafeThemeHandle.cs
- Util.cs
- ObjectItemAssemblyLoader.cs
- LambdaCompiler.Statements.cs
- RequestResizeEvent.cs
- Membership.cs
- SqlDataSourceFilteringEventArgs.cs
- StringHandle.cs
- CopyNodeSetAction.cs
- EdmMember.cs
- Convert.cs
- SessionStateItemCollection.cs
- CriticalExceptions.cs
- ConfigurationValidatorAttribute.cs
- RemotingException.cs
- MainMenu.cs
- MouseOverProperty.cs
- IndexedGlyphRun.cs
- MobileControlPersister.cs
- SmtpException.cs
- RepeaterItemEventArgs.cs
- SemanticResultValue.cs
- UnsafeNativeMethods.cs
- ServiceManager.cs
- LineMetrics.cs
- MILUtilities.cs
- HttpCookie.cs
- XmlSchemaChoice.cs
- FontWeightConverter.cs
- ProfileBuildProvider.cs
- SuppressIldasmAttribute.cs
- StsCommunicationException.cs
- TabPanel.cs
- Bidi.cs
- XMLSyntaxException.cs
- Light.cs
- ListViewGroupConverter.cs
- WebPartEditorCancelVerb.cs
- UpdatePanelControlTrigger.cs
- UnsafeNativeMethods.cs
- XmlImplementation.cs
- DefaultMemberAttribute.cs
- SqlDependencyUtils.cs
- RoutingExtension.cs
- PrintPreviewGraphics.cs
- SchemaImporterExtension.cs
- TemplateBindingExtension.cs
- Attributes.cs
- QilParameter.cs
- ExpressionPrefixAttribute.cs
- SessionEndingCancelEventArgs.cs
- GZipDecoder.cs
- HtmlButton.cs
- BaseTemplatedMobileComponentEditor.cs
- ThreadInterruptedException.cs
- AssemblyBuilder.cs
- StylusEditingBehavior.cs
- StorageEntityTypeMapping.cs
- PingOptions.cs
- SchemaMerger.cs
- ObjectAssociationEndMapping.cs
- ProcessModelInfo.cs
- Site.cs
- VectorKeyFrameCollection.cs
- SoapMessage.cs
- LifetimeManager.cs
- PointHitTestParameters.cs
- CommandField.cs
- BufferedOutputAsyncStream.cs
- ToolboxItemAttribute.cs
- ViewStateModeByIdAttribute.cs
- SystemIPGlobalProperties.cs
- FilterableAttribute.cs
- TextServicesCompartmentContext.cs
- CacheSection.cs
- RootBuilder.cs
- DrawingAttributesDefaultValueFactory.cs
- MimeTypeMapper.cs
- ControlAdapter.cs
- NullRuntimeConfig.cs
- ContentFileHelper.cs
- WebBrowserNavigatingEventHandler.cs
- HttpInputStream.cs
- GeneralTransform3DGroup.cs
- ToolStripPanel.cs