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
- DiscoveryClientReferences.cs
- UriTemplateQueryValue.cs
- CommonDialog.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- CacheDependency.cs
- Timeline.cs
- BamlBinaryWriter.cs
- ToolStripControlHost.cs
- SafeLocalMemHandle.cs
- HtmlLink.cs
- MarkupCompilePass1.cs
- ContentDisposition.cs
- TextFormatterHost.cs
- Dispatcher.cs
- FileFormatException.cs
- FilteredAttributeCollection.cs
- DtcInterfaces.cs
- ImageSourceValueSerializer.cs
- ComAdminWrapper.cs
- MenuStrip.cs
- HttpException.cs
- DrawingContextDrawingContextWalker.cs
- BufferedReadStream.cs
- TypeConverterHelper.cs
- EdmToObjectNamespaceMap.cs
- _KerberosClient.cs
- StorageEntitySetMapping.cs
- StyleSelector.cs
- BitmapEffectOutputConnector.cs
- ScriptHandlerFactory.cs
- PassportAuthenticationModule.cs
- ScriptingRoleServiceSection.cs
- diagnosticsswitches.cs
- PrefixQName.cs
- _DigestClient.cs
- SmiEventSink.cs
- WebServiceParameterData.cs
- EndEvent.cs
- TaskFactory.cs
- WebPartManagerInternals.cs
- CodeDomComponentSerializationService.cs
- Shared.cs
- MatrixAnimationBase.cs
- ServiceElementCollection.cs
- CqlGenerator.cs
- ExtendedPropertyDescriptor.cs
- SwitchLevelAttribute.cs
- MemberInfoSerializationHolder.cs
- infer.cs
- ReadWriteObjectLock.cs
- XhtmlBasicValidationSummaryAdapter.cs
- EventLogPropertySelector.cs
- X509ClientCertificateCredentialsElement.cs
- CqlLexer.cs
- XmlCollation.cs
- Formatter.cs
- DesignTableCollection.cs
- Facet.cs
- SqlUserDefinedTypeAttribute.cs
- MaterialCollection.cs
- DockPattern.cs
- WebPartConnection.cs
- RouteValueExpressionBuilder.cs
- ScrollPattern.cs
- SrgsSubset.cs
- SendActivityDesignerTheme.cs
- QuadraticBezierSegment.cs
- JsonByteArrayDataContract.cs
- ResourceContainerWrapper.cs
- If.cs
- ProfilePropertySettings.cs
- AppLevelCompilationSectionCache.cs
- WindowVisualStateTracker.cs
- DelegateArgumentValue.cs
- List.cs
- ErrorHandler.cs
- DataServiceRequestException.cs
- EncoderFallback.cs
- TimelineGroup.cs
- XmlNamespaceDeclarationsAttribute.cs
- ArgumentException.cs
- ButtonRenderer.cs
- MaskedTextBoxDesigner.cs
- ReaderWriterLockWrapper.cs
- XPathDocumentBuilder.cs
- SignedPkcs7.cs
- PeerEndPoint.cs
- SwitchElementsCollection.cs
- SqlDataReader.cs
- ConfigurationLoader.cs
- ConnectionPointCookie.cs
- Object.cs
- MessageSecurityOverTcp.cs
- ServiceOperation.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- DataTableReaderListener.cs
- SoapDocumentMethodAttribute.cs
- MaskDesignerDialog.cs
- RoleService.cs
- DataReceivedEventArgs.cs