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
- EmptyQuery.cs
- ProgressBarRenderer.cs
- ListBox.cs
- ColorContext.cs
- PrintDocument.cs
- MenuItemBindingCollection.cs
- DataServiceHostWrapper.cs
- XmlSerializer.cs
- IndexOutOfRangeException.cs
- XmlCharCheckingReader.cs
- LabelLiteral.cs
- FontSourceCollection.cs
- Stroke.cs
- SoapObjectInfo.cs
- AssemblyResolver.cs
- CodeComment.cs
- DataContext.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- ScaleTransform.cs
- CodeExporter.cs
- ViewGenResults.cs
- GridItemPattern.cs
- ModifierKeysConverter.cs
- ChannelListenerBase.cs
- adornercollection.cs
- DesignTimeTemplateParser.cs
- MeasureData.cs
- ExternalException.cs
- NumberFormatInfo.cs
- RightsManagementManager.cs
- Directory.cs
- SQLGuidStorage.cs
- SerializationException.cs
- StylusShape.cs
- X500Name.cs
- BitmapFrame.cs
- MemberAccessException.cs
- ComboBoxDesigner.cs
- codemethodreferenceexpression.cs
- errorpatternmatcher.cs
- FileClassifier.cs
- MessageQuerySet.cs
- PagerSettings.cs
- TextEditorTyping.cs
- UpDownBase.cs
- RegexInterpreter.cs
- DiscoveryClientBindingElement.cs
- PagedDataSource.cs
- ScriptMethodAttribute.cs
- AdvancedBindingPropertyDescriptor.cs
- StylusButtonEventArgs.cs
- CompilerState.cs
- TypeConverterHelper.cs
- HttpStreamMessageEncoderFactory.cs
- CodeNamespaceImportCollection.cs
- RelatedPropertyManager.cs
- FileEnumerator.cs
- GlyphRun.cs
- uribuilder.cs
- Track.cs
- ByteRangeDownloader.cs
- ReadWriteSpinLock.cs
- ListViewGroupCollectionEditor.cs
- Line.cs
- SoapExtensionImporter.cs
- SafeEventLogReadHandle.cs
- SmiGettersStream.cs
- FileDialog_Vista_Interop.cs
- SqlProvider.cs
- ParentUndoUnit.cs
- IssuanceLicense.cs
- DataServiceEntityAttribute.cs
- FrameworkContentElementAutomationPeer.cs
- UnsafeNativeMethods.cs
- MethodImplAttribute.cs
- StringCollectionEditor.cs
- PropertiesTab.cs
- DataGridViewHeaderCell.cs
- SymbolResolver.cs
- PersonalizationState.cs
- ChannelSinkStacks.cs
- HtmlSelect.cs
- DiagnosticsElement.cs
- XmlTextWriter.cs
- DataBoundLiteralControl.cs
- MailWriter.cs
- DictionaryBase.cs
- ServerIdentity.cs
- StandardOleMarshalObject.cs
- TreeNodeCollectionEditor.cs
- DurableMessageDispatchInspector.cs
- ReadOnlyAttribute.cs
- CustomPopupPlacement.cs
- XmlLangPropertyAttribute.cs
- SimpleParser.cs
- DataGridViewCellCancelEventArgs.cs
- SmtpNegotiateAuthenticationModule.cs
- UpDownEvent.cs
- IntegerValidatorAttribute.cs
- NonPrimarySelectionGlyph.cs