Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / XPath / Internal / IteratorFilter.cs / 1305376 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TcpClientChannel.cs
- AnnotationResourceCollection.cs
- PrivilegeNotHeldException.cs
- CommandHelpers.cs
- EventSetter.cs
- AsymmetricSecurityProtocolFactory.cs
- SimpleHandlerFactory.cs
- DbConnectionStringCommon.cs
- CodeAccessPermission.cs
- XmlDocumentFragment.cs
- WpfPayload.cs
- PasswordBox.cs
- DeclarativeCatalogPartDesigner.cs
- MetadataItem.cs
- WebBrowser.cs
- EntityDataSourceStatementEditor.cs
- WorkItem.cs
- ToolBarPanel.cs
- Composition.cs
- WorkflowApplicationTerminatedException.cs
- ContentValidator.cs
- DataGridViewRowCollection.cs
- BindingNavigator.cs
- XmlProcessingInstruction.cs
- AccessedThroughPropertyAttribute.cs
- ScrollChrome.cs
- RegexCode.cs
- ConditionalExpression.cs
- DataGridViewCheckBoxCell.cs
- BindableTemplateBuilder.cs
- BitmapCodecInfo.cs
- TextViewSelectionProcessor.cs
- CredentialCache.cs
- Fonts.cs
- TableColumn.cs
- RemoteWebConfigurationHostStream.cs
- MSG.cs
- NativeMethodsOther.cs
- HttpCapabilitiesEvaluator.cs
- ContainerTracking.cs
- HtmlInputButton.cs
- DefaultHttpHandler.cs
- DynamicResourceExtensionConverter.cs
- NetMsmqSecurityElement.cs
- ToolboxDataAttribute.cs
- LinqDataSourceDeleteEventArgs.cs
- SqlCacheDependencySection.cs
- MarshalByValueComponent.cs
- Content.cs
- WebPartMovingEventArgs.cs
- HttpDebugHandler.cs
- LambdaCompiler.Statements.cs
- GlobalItem.cs
- XPathArrayIterator.cs
- KeyTimeConverter.cs
- RemotingServices.cs
- VariableAction.cs
- EntityDataSourceContextCreatingEventArgs.cs
- HtmlForm.cs
- TransformGroup.cs
- Privilege.cs
- PriorityBinding.cs
- Knowncolors.cs
- input.cs
- KnownBoxes.cs
- DBBindings.cs
- SrgsSemanticInterpretationTag.cs
- AspProxy.cs
- XmlSerializationGeneratedCode.cs
- RuleProcessor.cs
- UnmanagedMemoryStreamWrapper.cs
- ElementMarkupObject.cs
- log.cs
- EffectiveValueEntry.cs
- ReferentialConstraint.cs
- BitmapEffectGroup.cs
- HostingPreferredMapPath.cs
- IndentedTextWriter.cs
- FontStretch.cs
- Options.cs
- SiteMapDataSourceView.cs
- DaylightTime.cs
- ProtectedConfiguration.cs
- Help.cs
- AutoScrollHelper.cs
- RoleManagerSection.cs
- EditorZoneDesigner.cs
- SHA512.cs
- NavigateEvent.cs
- HelpProvider.cs
- CodeArgumentReferenceExpression.cs
- ParameterElement.cs
- IChannel.cs
- CacheMemory.cs
- NumericUpDownAccelerationCollection.cs
- TempEnvironment.cs
- ToolStripInSituService.cs
- Number.cs
- EnlistmentState.cs
- AssemblyInfo.cs