Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Data / System / Data / Common / HandlerBase.cs / 1 / 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. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TextPointer.cs
- Encoding.cs
- TextServicesContext.cs
- Tablet.cs
- Point3DValueSerializer.cs
- RoutedEventHandlerInfo.cs
- CryptoKeySecurity.cs
- Bezier.cs
- XmlSchemaProviderAttribute.cs
- Array.cs
- EncoderExceptionFallback.cs
- tibetanshape.cs
- HandlerFactoryWrapper.cs
- NullableIntSumAggregationOperator.cs
- LocalizationParserHooks.cs
- XmlSiteMapProvider.cs
- TextBoxBase.cs
- Zone.cs
- TdsEnums.cs
- Bold.cs
- DelayedRegex.cs
- AnnotationComponentManager.cs
- SystemIPInterfaceProperties.cs
- TransformGroup.cs
- FontNamesConverter.cs
- COM2EnumConverter.cs
- DBSqlParser.cs
- PasswordRecovery.cs
- SoapMessage.cs
- DataFormats.cs
- DrawItemEvent.cs
- ExpandableObjectConverter.cs
- StaticExtension.cs
- ResourceExpressionEditor.cs
- WsdlServiceChannelBuilder.cs
- XmlBufferReader.cs
- BoolLiteral.cs
- CacheMemory.cs
- ThemeDictionaryExtension.cs
- SByteConverter.cs
- LowerCaseStringConverter.cs
- FormViewPagerRow.cs
- RectIndependentAnimationStorage.cs
- ExpressionBinding.cs
- CodeEventReferenceExpression.cs
- ZoomComboBox.cs
- DataTablePropertyDescriptor.cs
- DrawingState.cs
- X509Certificate2.cs
- SafeArrayRankMismatchException.cs
- ResourceAttributes.cs
- ForwardPositionQuery.cs
- EventsTab.cs
- TextBoxBase.cs
- SchemaImporterExtensionElement.cs
- CollectionChangedEventManager.cs
- FamilyMap.cs
- FontInfo.cs
- FolderBrowserDialog.cs
- __ConsoleStream.cs
- MultiTargetingUtil.cs
- _LocalDataStore.cs
- HtmlButton.cs
- SmiConnection.cs
- HttpListenerElement.cs
- ScriptControl.cs
- DropDownButton.cs
- ControlDesigner.cs
- StubHelpers.cs
- PeerNameRecord.cs
- ItemAutomationPeer.cs
- QilNode.cs
- TableItemStyle.cs
- InfoCardConstants.cs
- SoapFault.cs
- XmlDataSourceView.cs
- SharedPersonalizationStateInfo.cs
- ListenerElementsCollection.cs
- TdsParserSessionPool.cs
- PublisherMembershipCondition.cs
- ShimAsPublicXamlType.cs
- OverflowException.cs
- EdmComplexPropertyAttribute.cs
- Rect3D.cs
- SectionInformation.cs
- SoapSchemaMember.cs
- TimelineGroup.cs
- ColumnHeader.cs
- ResourceExpression.cs
- DataGridViewBand.cs
- WebPartManager.cs
- TypeGeneratedEventArgs.cs
- SqlGenericUtil.cs
- XmlSchemaComplexContent.cs
- LabelExpression.cs
- safelinkcollection.cs
- SQLBinaryStorage.cs
- RemotingSurrogateSelector.cs
- DataTableMapping.cs
- HtmlEncodedRawTextWriter.cs