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
- EntityDataSourceWrapperCollection.cs
- BulletChrome.cs
- ProviderBase.cs
- AppSettingsReader.cs
- XamlGridLengthSerializer.cs
- ActiveXHelper.cs
- Html32TextWriter.cs
- lengthconverter.cs
- Char.cs
- HeaderUtility.cs
- StringUtil.cs
- QilTypeChecker.cs
- ObjectParameterCollection.cs
- TouchPoint.cs
- ServiceAuthorizationBehavior.cs
- DBBindings.cs
- PrivateFontCollection.cs
- InstanceLockedException.cs
- SqlRemoveConstantOrderBy.cs
- ApplicationActivator.cs
- CustomTrackingRecord.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- EmptyEnumerable.cs
- SmiRequestExecutor.cs
- DbConnectionPoolOptions.cs
- RefType.cs
- LinkedList.cs
- XPathAxisIterator.cs
- StandardMenuStripVerb.cs
- ClaimComparer.cs
- CountdownEvent.cs
- CacheEntry.cs
- SizeConverter.cs
- WebPartDeleteVerb.cs
- cookieexception.cs
- RayMeshGeometry3DHitTestResult.cs
- MailDefinition.cs
- WebPartMovingEventArgs.cs
- X509Certificate.cs
- RestHandler.cs
- DynamicControl.cs
- RSAProtectedConfigurationProvider.cs
- DefaultAutoFieldGenerator.cs
- PrintPreviewControl.cs
- XamlReaderHelper.cs
- GridSplitter.cs
- ListViewDesigner.cs
- TrustExchangeException.cs
- _Connection.cs
- MgmtConfigurationRecord.cs
- AspCompat.cs
- AbsoluteQuery.cs
- CommonDialog.cs
- CookieProtection.cs
- IUnknownConstantAttribute.cs
- DataGridViewButtonCell.cs
- DataSvcMapFile.cs
- OperatingSystem.cs
- WebBaseEventKeyComparer.cs
- ProxyManager.cs
- ServicePointManagerElement.cs
- SelfIssuedTokenFactoryCredential.cs
- ErrorsHelper.cs
- ZipIOModeEnforcingStream.cs
- ExpressionQuoter.cs
- PropertyCondition.cs
- BulletedListEventArgs.cs
- XmlCharCheckingWriter.cs
- Header.cs
- GeneralTransformGroup.cs
- HttpCachePolicyElement.cs
- FilterRepeater.cs
- Mapping.cs
- Tag.cs
- HttpModulesSection.cs
- DefaultTraceListener.cs
- GuidTagList.cs
- SnapLine.cs
- CodeMethodInvokeExpression.cs
- DataGridViewBand.cs
- documentsequencetextcontainer.cs
- StringComparer.cs
- SemaphoreSlim.cs
- HttpListenerPrefixCollection.cs
- Brushes.cs
- ConstructorNeedsTagAttribute.cs
- IOThreadScheduler.cs
- EncoderParameters.cs
- BinaryObjectReader.cs
- KnownTypes.cs
- FileVersionInfo.cs
- AsyncResult.cs
- EntityDesignerBuildProvider.cs
- DataGridViewControlCollection.cs
- ExceptionUtility.cs
- XmlLinkedNode.cs
- UTF32Encoding.cs
- NonVisualControlAttribute.cs
- WebServiceFault.cs
- ProfileParameter.cs