Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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. // //[....] //[....] //----------------------------------------------------------------------------- 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
- RSAOAEPKeyExchangeFormatter.cs
- GPRECTF.cs
- FlowchartDesigner.xaml.cs
- ProfileService.cs
- XmlHierarchicalDataSourceView.cs
- RequestCacheManager.cs
- Component.cs
- DictionaryChange.cs
- LinkedList.cs
- SQLDecimalStorage.cs
- PreProcessInputEventArgs.cs
- TypeSystem.cs
- Int32CollectionValueSerializer.cs
- securestring.cs
- ToolStripDesignerAvailabilityAttribute.cs
- ReadWriteSpinLock.cs
- Attributes.cs
- XmlNodeChangedEventManager.cs
- AutomationProperty.cs
- SafeNativeMethodsOther.cs
- GridSplitter.cs
- TypeBuilderInstantiation.cs
- _BaseOverlappedAsyncResult.cs
- GridItemPattern.cs
- ListViewInsertionMark.cs
- TextBounds.cs
- WindowsGraphicsWrapper.cs
- ExclusiveTcpTransportManager.cs
- COAUTHINFO.cs
- RuntimeWrappedException.cs
- ReturnType.cs
- DataGridViewCellCollection.cs
- ArraySortHelper.cs
- EllipseGeometry.cs
- PointCollectionValueSerializer.cs
- AsnEncodedData.cs
- UserCancellationException.cs
- WinFormsUtils.cs
- TextRunProperties.cs
- CodeMemberProperty.cs
- Page.cs
- EventTrigger.cs
- WCFBuildProvider.cs
- XmlByteStreamReader.cs
- DeviceSpecific.cs
- EntityDesignerUtils.cs
- ExpressionBuilder.cs
- RepeatBehaviorConverter.cs
- IUnknownConstantAttribute.cs
- Message.cs
- DescendantQuery.cs
- SafeWaitHandle.cs
- RuntimeCompatibilityAttribute.cs
- basenumberconverter.cs
- BuildProvider.cs
- WebSysDescriptionAttribute.cs
- GenericsInstances.cs
- QuaternionAnimation.cs
- DoubleCollectionConverter.cs
- TcpServerChannel.cs
- RangeContentEnumerator.cs
- AssemblyBuilderData.cs
- Directory.cs
- SqlRemoveConstantOrderBy.cs
- StatusBar.cs
- InvokeMethodActivityDesigner.cs
- ConnectionStringEditor.cs
- OleDbSchemaGuid.cs
- ZoneIdentityPermission.cs
- OutArgument.cs
- BindableTemplateBuilder.cs
- DbProviderServices.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- Compiler.cs
- Pointer.cs
- DataGridColumnHeaderItemAutomationPeer.cs
- TemplateComponentConnector.cs
- UdpUtility.cs
- CodeObjectCreateExpression.cs
- SqlNotificationEventArgs.cs
- SizeKeyFrameCollection.cs
- AsymmetricAlgorithm.cs
- TypeDescriptor.cs
- SQLUtility.cs
- InheritedPropertyDescriptor.cs
- InstanceView.cs
- EncodingInfo.cs
- ArrangedElementCollection.cs
- MessageEventSubscriptionService.cs
- SystemIPGlobalProperties.cs
- AttributeCollection.cs
- ReflectionUtil.cs
- KnownBoxes.cs
- SynchronizationValidator.cs
- CacheHelper.cs
- RegionInfo.cs
- FormatVersion.cs
- Membership.cs
- Int16Animation.cs
- Utils.cs