Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- EntityContainerEmitter.cs
- AnimatedTypeHelpers.cs
- TabPanel.cs
- DecodeHelper.cs
- MergeFailedEvent.cs
- HttpCacheParams.cs
- XamlTreeBuilder.cs
- WindowsAuthenticationEventArgs.cs
- Renderer.cs
- RuntimeEnvironment.cs
- SafeNativeMethods.cs
- TextFormatter.cs
- DefaultWorkflowLoaderService.cs
- TextEffectResolver.cs
- DbMetaDataColumnNames.cs
- HttpAsyncResult.cs
- DtcInterfaces.cs
- XmlSerializableWriter.cs
- SqlCacheDependencySection.cs
- WebControlAdapter.cs
- DownloadProgressEventArgs.cs
- SqlDataSourceFilteringEventArgs.cs
- DesignerAttribute.cs
- WorkflowDesignerColors.cs
- DebugHandleTracker.cs
- COMException.cs
- UInt64Storage.cs
- DataComponentMethodGenerator.cs
- XmlSchemaSimpleContentExtension.cs
- OptimalTextSource.cs
- RectAnimationClockResource.cs
- HttpCacheParams.cs
- DataGridViewCellParsingEventArgs.cs
- _SSPIWrapper.cs
- ListDictionary.cs
- Enum.cs
- InvokeHandlers.cs
- SqlMethods.cs
- ShapingWorkspace.cs
- ColorAnimationBase.cs
- RegexStringValidatorAttribute.cs
- Polygon.cs
- ResumeStoryboard.cs
- DataList.cs
- AnimationTimeline.cs
- SerializationInfoEnumerator.cs
- PersonalizablePropertyEntry.cs
- ImageDrawing.cs
- TimeSpanConverter.cs
- InsufficientMemoryException.cs
- NotFiniteNumberException.cs
- ZipPackage.cs
- RadialGradientBrush.cs
- HierarchicalDataSourceDesigner.cs
- _Rfc2616CacheValidators.cs
- WindowsEditBox.cs
- NonParentingControl.cs
- SimpleWebHandlerParser.cs
- PolicyFactory.cs
- Native.cs
- CookielessHelper.cs
- OdbcConnectionOpen.cs
- FreezableDefaultValueFactory.cs
- QilInvokeEarlyBound.cs
- PerformanceCounters.cs
- ButtonFieldBase.cs
- HttpRequest.cs
- WindowsUpDown.cs
- SmtpReplyReader.cs
- SafeNativeMethods.cs
- WindowsStartMenu.cs
- JournalEntryListConverter.cs
- XsdBuildProvider.cs
- View.cs
- StylusOverProperty.cs
- EventDriven.cs
- DispatcherSynchronizationContext.cs
- SortedDictionary.cs
- HtmlTitle.cs
- Material.cs
- ObjectViewFactory.cs
- DesignerValidationSummaryAdapter.cs
- AccessDataSourceView.cs
- Command.cs
- DataGridViewRowsAddedEventArgs.cs
- PropertyEmitter.cs
- Pipe.cs
- RuntimeArgumentHandle.cs
- SamlConditions.cs
- IdentityReference.cs
- UTF32Encoding.cs
- DbConnectionPoolGroupProviderInfo.cs
- MappingModelBuildProvider.cs
- DataGridViewRowsRemovedEventArgs.cs
- NetworkCredential.cs
- ConsoleKeyInfo.cs
- FileNameEditor.cs
- GPRECTF.cs
- ContainerSelectorBehavior.cs
- RotationValidation.cs