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
- SetterBase.cs
- isolationinterop.cs
- PeerNameRecord.cs
- CryptoApi.cs
- SequenceDesigner.cs
- PropertyEntry.cs
- XmlWriterTraceListener.cs
- XmlSchemaIdentityConstraint.cs
- BitmapPalettes.cs
- SizeAnimationUsingKeyFrames.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- CompilerHelpers.cs
- MeasureItemEvent.cs
- PathSegment.cs
- QueryServiceConfigHandle.cs
- ResXResourceSet.cs
- AssemblyInfo.cs
- PassportAuthentication.cs
- XslCompiledTransform.cs
- CacheChildrenQuery.cs
- SchemaElementLookUpTable.cs
- KeyInstance.cs
- PrintController.cs
- SqlCommand.cs
- HiddenFieldDesigner.cs
- TransformDescriptor.cs
- String.cs
- LinearKeyFrames.cs
- ComponentEditorPage.cs
- TextOnlyOutput.cs
- ClientTargetSection.cs
- PropagatorResult.cs
- Function.cs
- ListenDesigner.cs
- DetailsViewDeletedEventArgs.cs
- CustomError.cs
- HwndMouseInputProvider.cs
- NotifyParentPropertyAttribute.cs
- SmtpReplyReader.cs
- UserNameSecurityToken.cs
- SqlAliaser.cs
- sqlinternaltransaction.cs
- BStrWrapper.cs
- UidPropertyAttribute.cs
- ClickablePoint.cs
- HttpRuntimeSection.cs
- FileUpload.cs
- WpfGeneratedKnownTypes.cs
- PackageStore.cs
- DataGridColumnHeadersPresenter.cs
- ControlAdapter.cs
- EntityConnection.cs
- TraceSource.cs
- IconBitmapDecoder.cs
- ClrProviderManifest.cs
- AsymmetricCryptoHandle.cs
- DelayedRegex.cs
- IPEndPoint.cs
- HitTestWithGeometryDrawingContextWalker.cs
- SizeConverter.cs
- ListViewItem.cs
- ViewCellRelation.cs
- UIAgentCrashedException.cs
- LoginUtil.cs
- XmlParserContext.cs
- Instrumentation.cs
- CommandPlan.cs
- SessionPageStatePersister.cs
- PathFigure.cs
- StateDesigner.cs
- Exceptions.cs
- BasicExpandProvider.cs
- HtmlControl.cs
- Sql8ConformanceChecker.cs
- ElementMarkupObject.cs
- InternalPermissions.cs
- AsyncOperation.cs
- Vertex.cs
- RelationshipEndMember.cs
- TextRangeBase.cs
- XpsException.cs
- Int16AnimationBase.cs
- UnsafeNativeMethods.cs
- DesignConnectionCollection.cs
- XhtmlBasicCommandAdapter.cs
- ColorIndependentAnimationStorage.cs
- DescendantOverDescendantQuery.cs
- SqlProcedureAttribute.cs
- SettingsProviderCollection.cs
- DesignerActionTextItem.cs
- ParagraphResult.cs
- Internal.cs
- CodeAttributeArgumentCollection.cs
- XmlToDatasetMap.cs
- PersonalizableAttribute.cs
- ProgressBar.cs
- BooleanSwitch.cs
- NumericExpr.cs
- RegexInterpreter.cs
- ReaderContextStackData.cs