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
- SlotInfo.cs
- QueryCacheManager.cs
- ExceptionDetail.cs
- DataViewManagerListItemTypeDescriptor.cs
- ExpressionContext.cs
- RequestResizeEvent.cs
- SqlDuplicator.cs
- CodeArgumentReferenceExpression.cs
- TemplateControlBuildProvider.cs
- Vector3DValueSerializer.cs
- GZipUtils.cs
- OleDbTransaction.cs
- NavigateEvent.cs
- ScriptReference.cs
- SmiMetaData.cs
- JavascriptCallbackResponseProperty.cs
- CommentAction.cs
- ClientTargetSection.cs
- ValueUtilsSmi.cs
- URLString.cs
- SessionPageStateSection.cs
- XmlSchemaComplexContentRestriction.cs
- StylusPointPropertyUnit.cs
- BaseConfigurationRecord.cs
- ToolStripPanelRenderEventArgs.cs
- RawTextInputReport.cs
- CompiledIdentityConstraint.cs
- MasterPage.cs
- GenericXmlSecurityToken.cs
- HeaderCollection.cs
- X509Utils.cs
- Span.cs
- PopupRootAutomationPeer.cs
- InputScopeManager.cs
- InheritanceAttribute.cs
- ExecutionContext.cs
- SqlTopReducer.cs
- LogicalCallContext.cs
- Condition.cs
- IsolatedStoragePermission.cs
- DbParameterCollection.cs
- TemplateField.cs
- ProtocolsConfigurationEntry.cs
- FloatUtil.cs
- ActiveXHelper.cs
- XmlNamedNodeMap.cs
- PassportIdentity.cs
- DataGridViewCellCancelEventArgs.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- shaperfactoryquerycacheentry.cs
- CalendarDateRangeChangingEventArgs.cs
- FileLoadException.cs
- validationstate.cs
- FacetValueContainer.cs
- XmlComment.cs
- PreviewPrintController.cs
- PersistChildrenAttribute.cs
- DocumentCollection.cs
- objectresult_tresulttype.cs
- CodeGen.cs
- SessionPageStatePersister.cs
- ServiceContractGenerator.cs
- WinCategoryAttribute.cs
- SessionStateItemCollection.cs
- LinkedResource.cs
- BreakRecordTable.cs
- TypeElement.cs
- MouseWheelEventArgs.cs
- SymbolPair.cs
- ClientOptions.cs
- ProviderIncompatibleException.cs
- DynamicMethod.cs
- GorillaCodec.cs
- ListViewDataItem.cs
- UserMapPath.cs
- UndoManager.cs
- TextTreeObjectNode.cs
- ArrangedElementCollection.cs
- ZipIOCentralDirectoryFileHeader.cs
- PersonalizationDictionary.cs
- AssemblyFilter.cs
- RuleCache.cs
- TagMapCollection.cs
- CodeAttributeDeclaration.cs
- LocalFileSettingsProvider.cs
- GridViewRowPresenter.cs
- OutputCacheProfileCollection.cs
- CorrelationKey.cs
- RemoteX509AsymmetricSecurityKey.cs
- RenderingBiasValidation.cs
- CatalogZoneDesigner.cs
- ListControl.cs
- InstallerTypeAttribute.cs
- Parser.cs
- XmlDataSource.cs
- BCLDebug.cs
- SecureEnvironment.cs
- ProfileParameter.cs
- invalidudtexception.cs
- COM2TypeInfoProcessor.cs