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
- SerializationTrace.cs
- PartialTrustVisibleAssemblyCollection.cs
- LayoutUtils.cs
- MailSettingsSection.cs
- QualifiedCellIdBoolean.cs
- GuidelineCollection.cs
- ResourceCodeDomSerializer.cs
- HMACSHA512.cs
- FactoryId.cs
- CachedPathData.cs
- COSERVERINFO.cs
- Msmq.cs
- DefaultAsyncDataDispatcher.cs
- XmlCodeExporter.cs
- Aggregates.cs
- Label.cs
- WebReferencesBuildProvider.cs
- CryptoSession.cs
- ObjectReferenceStack.cs
- UrlEncodedParameterWriter.cs
- Facet.cs
- BitmapImage.cs
- DataGridViewCellFormattingEventArgs.cs
- ToolBarTray.cs
- FormViewCommandEventArgs.cs
- COM2IPerPropertyBrowsingHandler.cs
- MethodInfo.cs
- SecurityTokenException.cs
- ScrollChrome.cs
- ExpandSegment.cs
- Point4DConverter.cs
- PageCatalogPartDesigner.cs
- ShadowGlyph.cs
- TextCollapsingProperties.cs
- SamlAssertion.cs
- DefaultParameterValueAttribute.cs
- PasswordBoxAutomationPeer.cs
- PrimitiveSchema.cs
- RankException.cs
- MsmqProcessProtocolHandler.cs
- DataSetUtil.cs
- ControlTemplate.cs
- ComponentRenameEvent.cs
- CLRBindingWorker.cs
- SafeThemeHandle.cs
- ChannelDispatcher.cs
- HtmlControl.cs
- NumberFunctions.cs
- AutoResizedEvent.cs
- ContainsRowNumberChecker.cs
- TextEditorDragDrop.cs
- Padding.cs
- AssemblyCache.cs
- RequestResizeEvent.cs
- DbCommandDefinition.cs
- OperandQuery.cs
- XmlSerializationReader.cs
- ObjectList.cs
- DictionarySectionHandler.cs
- RestHandler.cs
- LabelAutomationPeer.cs
- OdbcRowUpdatingEvent.cs
- DataMisalignedException.cs
- x509store.cs
- ParallelTimeline.cs
- RIPEMD160Managed.cs
- SystemUnicastIPAddressInformation.cs
- ListViewItem.cs
- XPathDocumentBuilder.cs
- GeometryValueSerializer.cs
- SerializationException.cs
- PersonalizationAdministration.cs
- ArglessEventHandlerProxy.cs
- EditorPartCollection.cs
- SortQuery.cs
- TailCallAnalyzer.cs
- DefaultTextStoreTextComposition.cs
- _ListenerResponseStream.cs
- TypeValidationEventArgs.cs
- ListBindingConverter.cs
- ItemCollectionEditor.cs
- SignatureToken.cs
- SqlVisitor.cs
- DelimitedListTraceListener.cs
- BitmapImage.cs
- ObjectListDataBindEventArgs.cs
- DBDataPermission.cs
- RequestQueue.cs
- XmlNode.cs
- Stackframe.cs
- SurrogateEncoder.cs
- TreeNodeClickEventArgs.cs
- WmpBitmapDecoder.cs
- CompoundFileDeflateTransform.cs
- HttpCookieCollection.cs
- MappingSource.cs
- TemplateControlCodeDomTreeGenerator.cs
- RbTree.cs
- Debug.cs
- HeaderPanel.cs