Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / Xml / System / Xml / XPath / Internal / IteratorFilter.cs / 1 / IteratorFilter.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
//-----------------------------------------------------------------------------
namespace MS.Internal.Xml.XPath {
using System;
using System.Xml;
using System.Xml.XPath;
using System.Diagnostics;
using System.Globalization;
internal class IteratorFilter : XPathNodeIterator {
private XPathNodeIterator innerIterator;
private string name;
private int position = 0;
internal IteratorFilter(XPathNodeIterator innerIterator, string name) {
this.innerIterator = innerIterator;
this.name = name;
}
private IteratorFilter(IteratorFilter it) {
this.innerIterator = it.innerIterator.Clone();
this.name = it.name;
this.position = it.position;
}
public override XPathNodeIterator Clone() { return new IteratorFilter(this); }
public override XPathNavigator Current { get { return innerIterator.Current;} }
public override int CurrentPosition { get { return this.position; } }
public override bool MoveNext() {
while(innerIterator.MoveNext()) {
if(innerIterator.Current.LocalName == this.name) {
this.position ++;
return true;
}
}
return false;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
//-----------------------------------------------------------------------------
namespace MS.Internal.Xml.XPath {
using System;
using System.Xml;
using System.Xml.XPath;
using System.Diagnostics;
using System.Globalization;
internal class IteratorFilter : XPathNodeIterator {
private XPathNodeIterator innerIterator;
private string name;
private int position = 0;
internal IteratorFilter(XPathNodeIterator innerIterator, string name) {
this.innerIterator = innerIterator;
this.name = name;
}
private IteratorFilter(IteratorFilter it) {
this.innerIterator = it.innerIterator.Clone();
this.name = it.name;
this.position = it.position;
}
public override XPathNodeIterator Clone() { return new IteratorFilter(this); }
public override XPathNavigator Current { get { return innerIterator.Current;} }
public override int CurrentPosition { get { return this.position; } }
public override bool MoveNext() {
while(innerIterator.MoveNext()) {
if(innerIterator.Current.LocalName == this.name) {
this.position ++;
return true;
}
}
return false;
}
}
}
// 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
- HashSetDebugView.cs
- RtfToXamlReader.cs
- TypeGeneratedEventArgs.cs
- IntPtr.cs
- ObjectDataProvider.cs
- PrintPageEvent.cs
- TextBoxLine.cs
- BooleanSwitch.cs
- ObsoleteAttribute.cs
- EntityProxyTypeInfo.cs
- DispatcherFrame.cs
- WebPartDisplayModeCancelEventArgs.cs
- LinkLabelLinkClickedEvent.cs
- InputLanguage.cs
- DummyDataSource.cs
- ToggleProviderWrapper.cs
- TraceContextRecord.cs
- SiteMapDesignerDataSourceView.cs
- SoapRpcServiceAttribute.cs
- Control.cs
- NativeActivityTransactionContext.cs
- ListenerElementsCollection.cs
- SchemaHelper.cs
- SafeSystemMetrics.cs
- InOutArgument.cs
- PolyBezierSegment.cs
- OLEDB_Enum.cs
- AxisAngleRotation3D.cs
- TaiwanLunisolarCalendar.cs
- FileInfo.cs
- Item.cs
- SortQueryOperator.cs
- CompositeKey.cs
- SessionPageStatePersister.cs
- AssociationSetEnd.cs
- GatewayDefinition.cs
- TextBreakpoint.cs
- DbSetClause.cs
- RouteParameter.cs
- XmlDataDocument.cs
- Context.cs
- Mapping.cs
- GifBitmapEncoder.cs
- SourceChangedEventArgs.cs
- InvalidPropValue.cs
- PtsCache.cs
- FieldDescriptor.cs
- Mapping.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- ViewStateException.cs
- XmlValidatingReaderImpl.cs
- SerializerProvider.cs
- CodeEntryPointMethod.cs
- TraceSection.cs
- BaseTemplateBuildProvider.cs
- PasswordTextNavigator.cs
- ConstNode.cs
- XmlName.cs
- ObjectCloneHelper.cs
- ProfileService.cs
- TemplateField.cs
- BamlLocalizationDictionary.cs
- ApplicationException.cs
- UIPropertyMetadata.cs
- CompilationLock.cs
- SHA256CryptoServiceProvider.cs
- CryptoProvider.cs
- BasePropertyDescriptor.cs
- QuotedStringFormatReader.cs
- FileLoadException.cs
- Trace.cs
- dtdvalidator.cs
- StackSpiller.Bindings.cs
- ZipIOLocalFileBlock.cs
- DataViewSetting.cs
- MetaColumn.cs
- AlternateViewCollection.cs
- XsdDataContractExporter.cs
- WaitHandleCannotBeOpenedException.cs
- ValidationSummary.cs
- TextShapeableCharacters.cs
- CacheDependency.cs
- COSERVERINFO.cs
- PropertyPath.cs
- PointAnimationBase.cs
- VisualStyleRenderer.cs
- XmlNode.cs
- HyperLinkColumn.cs
- Utility.cs
- TransactionFlowElement.cs
- Button.cs
- XmlReaderDelegator.cs
- TypeDependencyAttribute.cs
- EmitterCache.cs
- PopOutPanel.cs
- DrawListViewColumnHeaderEventArgs.cs
- SafeProcessHandle.cs
- Viewport3DVisual.cs
- Frame.cs
- Panel.cs