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
- TextAnchor.cs
- SimpleTypeResolver.cs
- StorageComplexTypeMapping.cs
- EventLogHandle.cs
- UidPropertyAttribute.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- DecodeHelper.cs
- WebEvents.cs
- WriteableBitmap.cs
- UpdateEventArgs.cs
- InternalBufferOverflowException.cs
- AstTree.cs
- basecomparevalidator.cs
- UnaryExpressionHelper.cs
- InternalConfigHost.cs
- RecommendedAsConfigurableAttribute.cs
- InsufficientMemoryException.cs
- HandleRef.cs
- CodeIdentifier.cs
- SHA1CryptoServiceProvider.cs
- TextProperties.cs
- SQLDoubleStorage.cs
- SessionPageStatePersister.cs
- SaveFileDialog.cs
- LinkedResource.cs
- NumericUpDown.cs
- MemoryPressure.cs
- OleDbRowUpdatingEvent.cs
- Queue.cs
- TextBoxView.cs
- VersionedStreamOwner.cs
- OpCellTreeNode.cs
- MainMenu.cs
- Script.cs
- SqlMethods.cs
- SafeWaitHandle.cs
- ReadOnlyDictionary.cs
- ProfilePropertyNameValidator.cs
- SvcMapFileLoader.cs
- WebPartMenuStyle.cs
- shaperfactoryquerycacheentry.cs
- GridViewRow.cs
- MachineKeySection.cs
- PersonalizationProvider.cs
- VisualStyleTypesAndProperties.cs
- ObjectNotFoundException.cs
- GifBitmapEncoder.cs
- ProfileService.cs
- DeliveryRequirementsAttribute.cs
- SQLSingle.cs
- OperatingSystem.cs
- DataFormat.cs
- MailAddressCollection.cs
- CodeTypeParameter.cs
- SourceFilter.cs
- SqlUserDefinedTypeAttribute.cs
- SortKey.cs
- Semaphore.cs
- RoutedUICommand.cs
- ListItem.cs
- PropagatorResult.cs
- XsltContext.cs
- ResourcesGenerator.cs
- RelatedEnd.cs
- XmlSchemaAppInfo.cs
- WebPartExportVerb.cs
- ManagementClass.cs
- DocumentPageTextView.cs
- Focus.cs
- HttpListenerException.cs
- StrokeSerializer.cs
- XpsDocumentEvent.cs
- SoapSchemaExporter.cs
- XmlException.cs
- FrameworkElementAutomationPeer.cs
- HttpProfileGroupBase.cs
- DataGridBoolColumn.cs
- FormViewDeleteEventArgs.cs
- Sequence.cs
- StructuredTypeEmitter.cs
- EncoderFallback.cs
- SharedPersonalizationStateInfo.cs
- DynamicMethod.cs
- AvtEvent.cs
- SiteMapDataSourceView.cs
- CounterSampleCalculator.cs
- XmlEventCache.cs
- CookielessHelper.cs
- MaskedTextProvider.cs
- InvokePattern.cs
- XmlUrlEditor.cs
- SqlDataSourceTableQuery.cs
- DbFunctionCommandTree.cs
- CompressEmulationStream.cs
- DocobjHost.cs
- TagMapInfo.cs
- RSAOAEPKeyExchangeDeformatter.cs
- CompensatableTransactionScopeActivity.cs
- WithParamAction.cs
- StylusCollection.cs