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
- webclient.cs
- HtmlLiteralTextAdapter.cs
- UnsafeNativeMethods.cs
- HttpRequestWrapper.cs
- PolicyManager.cs
- NameTable.cs
- XpsSerializationManagerAsync.cs
- XmlFormatExtensionPrefixAttribute.cs
- EdmToObjectNamespaceMap.cs
- Base64Encoding.cs
- EdmRelationshipRoleAttribute.cs
- SimpleNameService.cs
- Camera.cs
- StandardToolWindows.cs
- UidManager.cs
- RegexCompilationInfo.cs
- VisualStyleTypesAndProperties.cs
- NestedContainer.cs
- ClientTarget.cs
- ProgressBarAutomationPeer.cs
- HeaderedContentControl.cs
- LexicalChunk.cs
- TableLayoutColumnStyleCollection.cs
- HostedHttpTransportManager.cs
- ProbeDuplexAsyncResult.cs
- HtmlAnchor.cs
- BindingContext.cs
- StringValidator.cs
- ObjectSecurity.cs
- Int32Collection.cs
- MetadataArtifactLoaderCompositeResource.cs
- KnownIds.cs
- AnimatedTypeHelpers.cs
- ToolStripPanelCell.cs
- WebServiceResponseDesigner.cs
- ObjectQueryProvider.cs
- XmlMemberMapping.cs
- LinqDataSourceContextEventArgs.cs
- SchemaNames.cs
- DES.cs
- MatchingStyle.cs
- AxisAngleRotation3D.cs
- Symbol.cs
- CollectionViewSource.cs
- ApplicationFileCodeDomTreeGenerator.cs
- StateMachineSubscription.cs
- GPStream.cs
- ProtocolElement.cs
- TypeCodeDomSerializer.cs
- ComAwareEventInfo.cs
- FontUnitConverter.cs
- ImageField.cs
- XmlNodeWriter.cs
- SecurityImpersonationBehavior.cs
- ProcessThreadCollection.cs
- ReaderWriterLock.cs
- wgx_sdk_version.cs
- CompiledRegexRunner.cs
- DoubleAnimation.cs
- Helper.cs
- RegexWorker.cs
- FrameAutomationPeer.cs
- JapaneseCalendar.cs
- ReservationNotFoundException.cs
- StringCollection.cs
- FormattedTextSymbols.cs
- NameValueSectionHandler.cs
- DefaultTraceListener.cs
- XmlLanguageConverter.cs
- TagMapInfo.cs
- HelpKeywordAttribute.cs
- ErrorFormatterPage.cs
- _DomainName.cs
- Canvas.cs
- PropertyOverridesDialog.cs
- Codec.cs
- CheckBoxList.cs
- StreamAsIStream.cs
- ElementHost.cs
- RootAction.cs
- DecoderFallback.cs
- AuditLog.cs
- MouseBinding.cs
- ImportContext.cs
- AdornerPresentationContext.cs
- SimpleBitVector32.cs
- FixUp.cs
- XhtmlTextWriter.cs
- ColorConverter.cs
- QilIterator.cs
- SettingsBindableAttribute.cs
- InputLanguageSource.cs
- FlowLayoutSettings.cs
- ImageField.cs
- ProcessInfo.cs
- XmlSchemaExporter.cs
- Match.cs
- BinaryWriter.cs
- StatusBarPanelClickEvent.cs
- XmlNodeList.cs