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
- ValidationContext.cs
- IsolatedStorageFilePermission.cs
- VarRemapper.cs
- PersonalizationStateInfo.cs
- ObjectListCommand.cs
- SQLRoleProvider.cs
- DataBoundControlDesigner.cs
- CodeVariableDeclarationStatement.cs
- LayoutUtils.cs
- NamedPipeProcessProtocolHandler.cs
- TrackingValidationObjectDictionary.cs
- FilterQueryOptionExpression.cs
- SqlNotificationEventArgs.cs
- WindowsTokenRoleProvider.cs
- TreeBuilderXamlTranslator.cs
- AttributeCollection.cs
- TableRowsCollectionEditor.cs
- WebPartDescription.cs
- CallbackValidatorAttribute.cs
- CompoundFileStorageReference.cs
- SkipStoryboardToFill.cs
- SerialPinChanges.cs
- AesCryptoServiceProvider.cs
- QueryTaskGroupState.cs
- RepeaterItemEventArgs.cs
- ContentElement.cs
- CellParagraph.cs
- Content.cs
- XmlNamespaceMapping.cs
- ConnectivityStatus.cs
- PagedDataSource.cs
- CodeConditionStatement.cs
- ListSortDescription.cs
- AmbientEnvironment.cs
- SQLInt16.cs
- AssociationSet.cs
- ThreadExceptionDialog.cs
- UiaCoreTypesApi.cs
- XmlSchemaSimpleContentRestriction.cs
- CodeDirectionExpression.cs
- XPathItem.cs
- FileDialogPermission.cs
- Item.cs
- HtmlContainerControl.cs
- MasterPageParser.cs
- DataChangedEventManager.cs
- AnimatedTypeHelpers.cs
- HttpCacheVaryByContentEncodings.cs
- ProvideValueServiceProvider.cs
- ExpressionBindingsDialog.cs
- BaseCollection.cs
- AutoSizeToolBoxItem.cs
- AspCompat.cs
- ReaderWriterLockWrapper.cs
- InputMethodStateTypeInfo.cs
- NameHandler.cs
- RedBlackList.cs
- SudsParser.cs
- HtmlTableRowCollection.cs
- RuntimeHelpers.cs
- PublishLicense.cs
- ObjectCache.cs
- VirtualPathData.cs
- MailBnfHelper.cs
- RuntimeTransactionHandle.cs
- ExtenderProviderService.cs
- MultipartContentParser.cs
- TypeResolvingOptionsAttribute.cs
- DatatypeImplementation.cs
- BufferBuilder.cs
- MonthCalendar.cs
- ToolbarAUtomationPeer.cs
- DefaultObjectMappingItemCollection.cs
- PasswordTextContainer.cs
- LogEntryHeaderDeserializer.cs
- DependentList.cs
- MeasureItemEvent.cs
- TreePrinter.cs
- CalloutQueueItem.cs
- CompositeFontParser.cs
- XmlUrlResolver.cs
- ConsoleCancelEventArgs.cs
- AddInSegmentDirectoryNotFoundException.cs
- DynamicDataExtensions.cs
- ListViewGroupConverter.cs
- Suspend.cs
- SwitchLevelAttribute.cs
- StringBuilder.cs
- NameObjectCollectionBase.cs
- ElementNotAvailableException.cs
- SoapCodeExporter.cs
- TreeViewAutomationPeer.cs
- XmlNamedNodeMap.cs
- FileDialog_Vista.cs
- XmlSchemaProviderAttribute.cs
- FileUpload.cs
- GroupBox.cs
- SessionPageStatePersister.cs
- AutoSizeComboBox.cs
- RelativeSource.cs