Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Data / System / NewXml / BaseTreeIterator.cs / 1 / BaseTreeIterator.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
// [....]
// [....]
//-----------------------------------------------------------------------------
namespace System.Xml {
using System;
using System.Data;
using System.Diagnostics;
// Iterates over non-attribute nodes
internal abstract class BaseTreeIterator {
protected DataSetMapper mapper;
internal BaseTreeIterator( DataSetMapper mapper ) {
this.mapper = mapper;
}
internal abstract void Reset();
internal abstract XmlNode CurrentNode { get; }
internal abstract bool Next();
internal abstract bool NextRight();
internal bool NextRowElement() {
while ( Next() ) {
if ( OnRowElement() )
return true;
}
return false;
}
internal bool NextRightRowElement() {
if ( NextRight() ) {
if ( OnRowElement() )
return true;
return NextRowElement();
}
return false;
}
// Returns true if the current node is on a row element (head of a region)
internal bool OnRowElement() {
XmlBoundElement be = CurrentNode as XmlBoundElement;
return (be != null) && (be.Row != null);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
// [....]
// [....]
//-----------------------------------------------------------------------------
namespace System.Xml {
using System;
using System.Data;
using System.Diagnostics;
// Iterates over non-attribute nodes
internal abstract class BaseTreeIterator {
protected DataSetMapper mapper;
internal BaseTreeIterator( DataSetMapper mapper ) {
this.mapper = mapper;
}
internal abstract void Reset();
internal abstract XmlNode CurrentNode { get; }
internal abstract bool Next();
internal abstract bool NextRight();
internal bool NextRowElement() {
while ( Next() ) {
if ( OnRowElement() )
return true;
}
return false;
}
internal bool NextRightRowElement() {
if ( NextRight() ) {
if ( OnRowElement() )
return true;
return NextRowElement();
}
return false;
}
// Returns true if the current node is on a row element (head of a region)
internal bool OnRowElement() {
XmlBoundElement be = CurrentNode as XmlBoundElement;
return (be != null) && (be.Row != null);
}
}
}
// 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
- ImageSource.cs
- HtmlElement.cs
- TableTextElementCollectionInternal.cs
- prompt.cs
- ProcessModuleCollection.cs
- FixedMaxHeap.cs
- DataGridViewLayoutData.cs
- UpnEndpointIdentity.cs
- CatalogZoneBase.cs
- BamlTreeMap.cs
- KnownIds.cs
- InputQueueChannel.cs
- FixedSOMFixedBlock.cs
- CodeTypeReferenceExpression.cs
- RelatedView.cs
- WSHttpBinding.cs
- ServiceTimeoutsElement.cs
- RayHitTestParameters.cs
- OracleInternalConnection.cs
- XamlDesignerSerializationManager.cs
- ValueType.cs
- WindowsGraphics2.cs
- ProtocolsConfigurationEntry.cs
- Exceptions.cs
- TreeViewTemplateSelector.cs
- MulticastIPAddressInformationCollection.cs
- ColumnMapProcessor.cs
- XmlLinkedNode.cs
- PopupRoot.cs
- SmiConnection.cs
- SoapElementAttribute.cs
- GradientStop.cs
- followingsibling.cs
- XmlSerializerFaultFormatter.cs
- ScopeElementCollection.cs
- TaskHelper.cs
- XmlSchemaSimpleContentExtension.cs
- InputLanguageEventArgs.cs
- OutputCacheModule.cs
- CompilationRelaxations.cs
- InboundActivityHelper.cs
- XmlSchemaParticle.cs
- DbParameterCollection.cs
- Triangle.cs
- recordstatefactory.cs
- MetadataCache.cs
- ContextProperty.cs
- StopStoryboard.cs
- Base64WriteStateInfo.cs
- WebControlsSection.cs
- uribuilder.cs
- StyleSheetRefUrlEditor.cs
- ClaimTypes.cs
- UnsafeNativeMethodsMilCoreApi.cs
- ParameterCollection.cs
- SecurityResources.cs
- DbConvert.cs
- PreloadedPackages.cs
- Deserializer.cs
- ControlCollection.cs
- FontSource.cs
- Rijndael.cs
- OuterGlowBitmapEffect.cs
- RemotingConfiguration.cs
- GridLengthConverter.cs
- PrimitiveOperationFormatter.cs
- HTTPAPI_VERSION.cs
- Quad.cs
- DataGridPreparingCellForEditEventArgs.cs
- RetrieveVirtualItemEventArgs.cs
- _UncName.cs
- RtfControlWordInfo.cs
- CollectionView.cs
- ScrollItemProviderWrapper.cs
- MimeMapping.cs
- SqlClientPermission.cs
- Error.cs
- ToolBarButtonClickEvent.cs
- MtomMessageEncoder.cs
- TextElementEnumerator.cs
- EndpointNotFoundException.cs
- SubpageParagraph.cs
- HtmlUtf8RawTextWriter.cs
- WindowsRichEditRange.cs
- StrokeIntersection.cs
- SQLMembershipProvider.cs
- XmlRawWriterWrapper.cs
- FontUnit.cs
- ActiveDocumentEvent.cs
- _FtpControlStream.cs
- WindowAutomationPeer.cs
- TimeSpanValidatorAttribute.cs
- InlineObject.cs
- SiteMapPath.cs
- IPCCacheManager.cs
- ImageClickEventArgs.cs
- CopyCodeAction.cs
- RuntimeTransactionHandle.cs
- SplitterCancelEvent.cs
- RemotingService.cs