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
- SecurityKeyType.cs
- OverrideMode.cs
- SerialErrors.cs
- EventLogConfiguration.cs
- DataServiceClientException.cs
- EmptyEnumerator.cs
- ThreadStateException.cs
- SelectionItemPattern.cs
- NumberFormatInfo.cs
- HierarchicalDataBoundControl.cs
- StatusBarDrawItemEvent.cs
- TrackingCondition.cs
- DataSetMappper.cs
- CompilerLocalReference.cs
- _CookieModule.cs
- Pool.cs
- HttpListenerContext.cs
- DataGridViewButtonCell.cs
- TrackingServices.cs
- MonthChangedEventArgs.cs
- HttpProfileBase.cs
- TargetParameterCountException.cs
- HtmlInputHidden.cs
- AttributeSetAction.cs
- AttributeCollection.cs
- DataRowIndexBuffer.cs
- DataGridViewCellCollection.cs
- SafeFileMappingHandle.cs
- PrivateFontCollection.cs
- AnnouncementService.cs
- ToggleProviderWrapper.cs
- SynchronizedDispatch.cs
- JsonGlobals.cs
- ProfileParameter.cs
- DataControlImageButton.cs
- XmlObjectSerializer.cs
- RectangleF.cs
- InstanceCompleteException.cs
- SqlNotificationEventArgs.cs
- UriPrefixTable.cs
- MimeTypeAttribute.cs
- MasterPage.cs
- FontWeightConverter.cs
- DeflateEmulationStream.cs
- SrgsText.cs
- FactoryId.cs
- ClosableStream.cs
- Metafile.cs
- PnrpPeerResolverElement.cs
- XmlNotation.cs
- GridViewHeaderRowPresenter.cs
- EpmContentSerializer.cs
- VirtualPathProvider.cs
- ChameleonKey.cs
- RoleGroupCollectionEditor.cs
- RemotingService.cs
- TimeZoneInfo.cs
- HttpListenerRequestUriBuilder.cs
- HierarchicalDataBoundControl.cs
- metadatamappinghashervisitor.cs
- RelatedEnd.cs
- PlanCompilerUtil.cs
- Input.cs
- PathFigureCollection.cs
- TransformerInfo.cs
- RegexCapture.cs
- ValidationError.cs
- _AutoWebProxyScriptWrapper.cs
- ObjectAnimationBase.cs
- FirstMatchCodeGroup.cs
- SqlProcedureAttribute.cs
- DataGridClipboardCellContent.cs
- complextypematerializer.cs
- BamlVersionHeader.cs
- ElementAction.cs
- RadioButtonFlatAdapter.cs
- GestureRecognizer.cs
- XmlElementAttribute.cs
- GenerateHelper.cs
- VisualStateManager.cs
- ServiceDiscoveryBehavior.cs
- TransactedBatchContext.cs
- AttributeSetAction.cs
- Empty.cs
- CfgParser.cs
- webbrowsersite.cs
- X509CertificateTrustedIssuerElementCollection.cs
- Compiler.cs
- RoleManagerModule.cs
- ResumeStoryboard.cs
- XmlSchemaChoice.cs
- DynamicRouteExpression.cs
- PointKeyFrameCollection.cs
- TimeSpanValidatorAttribute.cs
- FilterQuery.cs
- DesignBindingPropertyDescriptor.cs
- XmlElementAttribute.cs
- ButtonField.cs
- DoubleCollectionValueSerializer.cs
- SkewTransform.cs