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
- KeyConverter.cs
- WindowsFormsHostPropertyMap.cs
- Speller.cs
- RepeatBehaviorConverter.cs
- ThrowHelper.cs
- StrongName.cs
- ExtenderProvidedPropertyAttribute.cs
- WSFederationHttpSecurity.cs
- MetadataSection.cs
- MonitoringDescriptionAttribute.cs
- COM2ColorConverter.cs
- CompositeDesignerAccessibleObject.cs
- XhtmlBasicLinkAdapter.cs
- LabelInfo.cs
- RotateTransform.cs
- ComponentConverter.cs
- TypeElementCollection.cs
- XmlSchemaAnyAttribute.cs
- FontStretchConverter.cs
- Compensation.cs
- isolationinterop.cs
- FileNotFoundException.cs
- XPathMultyIterator.cs
- PlatformCulture.cs
- IPPacketInformation.cs
- VerticalAlignConverter.cs
- UnitySerializationHolder.cs
- SmtpDigestAuthenticationModule.cs
- XamlFigureLengthSerializer.cs
- BindingSource.cs
- PrintDocument.cs
- ReflectionPermission.cs
- DetailsViewUpdatedEventArgs.cs
- SoapSchemaExporter.cs
- CompositeClientFormatter.cs
- ContextStack.cs
- ReturnValue.cs
- AccessDataSource.cs
- Compilation.cs
- RegisteredDisposeScript.cs
- BaseResourcesBuildProvider.cs
- PrePrepareMethodAttribute.cs
- WebPartChrome.cs
- WindowsButton.cs
- DbQueryCommandTree.cs
- XamlTreeBuilderBamlRecordWriter.cs
- InvokeWebServiceDesigner.cs
- StrokeNodeData.cs
- CompletionProxy.cs
- SemaphoreFullException.cs
- AmbientLight.cs
- ImageAutomationPeer.cs
- DashStyles.cs
- OledbConnectionStringbuilder.cs
- LinqDataSourceView.cs
- Vector3DAnimationUsingKeyFrames.cs
- Win32.cs
- KoreanCalendar.cs
- ExpanderAutomationPeer.cs
- SmtpAuthenticationManager.cs
- SQLMembershipProvider.cs
- GridProviderWrapper.cs
- MethodCallConverter.cs
- WaitForChangedResult.cs
- StandardOleMarshalObject.cs
- RepeatButton.cs
- EntryIndex.cs
- SafeNativeMethods.cs
- DomainConstraint.cs
- PersistenceTypeAttribute.cs
- DisplayNameAttribute.cs
- DependencyPropertyKey.cs
- Figure.cs
- HttpPostedFile.cs
- Base64Decoder.cs
- ProcessManager.cs
- MultiByteCodec.cs
- XmlSerializer.cs
- TraceProvider.cs
- TagNameToTypeMapper.cs
- DataReaderContainer.cs
- ContentPosition.cs
- KeyedQueue.cs
- MultiTrigger.cs
- PrivateFontCollection.cs
- CodeSnippetStatement.cs
- NullToBooleanConverter.cs
- StaticResourceExtension.cs
- WindowsListViewSubItem.cs
- RadioButtonAutomationPeer.cs
- HttpCachePolicy.cs
- Interlocked.cs
- DesignerDeviceConfig.cs
- MetabaseServerConfig.cs
- DesignerVerbCollection.cs
- IdentifierService.cs
- OutputCacheSettings.cs
- HorizontalAlignConverter.cs
- DateTimeOffset.cs
- HexParser.cs