Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- SqlEnums.cs
- XmlReflectionImporter.cs
- BinaryFormatterWriter.cs
- RedirectionProxy.cs
- FrameworkElement.cs
- WorkflowMessageEventArgs.cs
- DocobjHost.cs
- HostingPreferredMapPath.cs
- AllowedAudienceUriElement.cs
- __Filters.cs
- AttributeEmitter.cs
- HtmlImage.cs
- NotImplementedException.cs
- ProcessModelSection.cs
- HttpCacheVary.cs
- VScrollBar.cs
- ExpressionBuilderContext.cs
- CookieParameter.cs
- DataObjectEventArgs.cs
- DataServiceResponse.cs
- MexHttpBindingCollectionElement.cs
- ElementUtil.cs
- WorkflowInlining.cs
- LinkLabel.cs
- ISAPIApplicationHost.cs
- FutureFactory.cs
- ReadOnlyPropertyMetadata.cs
- RevocationPoint.cs
- ExpressionLink.cs
- Terminate.cs
- InputLangChangeRequestEvent.cs
- BoundPropertyEntry.cs
- PromptEventArgs.cs
- ZipPackagePart.cs
- ImageMapEventArgs.cs
- PeerCollaboration.cs
- ContentPresenter.cs
- EmbeddedMailObject.cs
- TextOptionsInternal.cs
- ExceptionRoutedEventArgs.cs
- ResourcePermissionBaseEntry.cs
- MailDefinition.cs
- TableLayoutRowStyleCollection.cs
- ResourceExpressionBuilder.cs
- NumericUpDownAccelerationCollection.cs
- MemberHolder.cs
- GenericsInstances.cs
- BaseInfoTable.cs
- HostedTcpTransportManager.cs
- PrintPreviewGraphics.cs
- SerTrace.cs
- _Rfc2616CacheValidators.cs
- XmlNamespaceManager.cs
- AnnotationMap.cs
- FrameworkTemplate.cs
- CompModSwitches.cs
- MenuItemCollection.cs
- ProfileGroupSettingsCollection.cs
- WebPartUserCapability.cs
- BorderGapMaskConverter.cs
- QueueProcessor.cs
- Barrier.cs
- ScriptingWebServicesSectionGroup.cs
- RenamedEventArgs.cs
- exports.cs
- TransactedBatchingElement.cs
- LambdaCompiler.Lambda.cs
- UserPreferenceChangedEventArgs.cs
- ActivityExecutionWorkItem.cs
- RelatedImageListAttribute.cs
- TypeReference.cs
- Converter.cs
- SystemWebSectionGroup.cs
- SubqueryTrackingVisitor.cs
- HttpRuntime.cs
- ApplicationManager.cs
- TextServicesDisplayAttribute.cs
- XamlPoint3DCollectionSerializer.cs
- LinqDataSourceView.cs
- ImplicitInputBrush.cs
- Vector3DAnimation.cs
- MediaContext.cs
- SByte.cs
- QueueProcessor.cs
- CompositeDispatchFormatter.cs
- EncodingStreamWrapper.cs
- SystemIPGlobalStatistics.cs
- QueryPageSettingsEventArgs.cs
- SimpleLine.cs
- DataGridDetailsPresenterAutomationPeer.cs
- SvcMapFileSerializer.cs
- AspNetSynchronizationContext.cs
- XsdDataContractExporter.cs
- DiscreteKeyFrames.cs
- XmlSchemaAll.cs
- ValueProviderWrapper.cs
- Descriptor.cs
- MetadataCache.cs
- ObjectItemLoadingSessionData.cs
- ColorBuilder.cs