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
- DesignBindingPropertyDescriptor.cs
- WebErrorHandler.cs
- ControlAdapter.cs
- controlskin.cs
- ResourceFallbackManager.cs
- EdmEntityTypeAttribute.cs
- FileSystemEventArgs.cs
- RuleSettingsCollection.cs
- SqlAggregateChecker.cs
- EvidenceTypeDescriptor.cs
- PlanCompilerUtil.cs
- HttpHandlerActionCollection.cs
- AuthenticationServiceManager.cs
- Point3DConverter.cs
- OutputScope.cs
- LicenseException.cs
- NavigatorInput.cs
- DictionaryTraceRecord.cs
- EncryptedKeyIdentifierClause.cs
- CodeMemberField.cs
- ProfileBuildProvider.cs
- SourceLineInfo.cs
- _AutoWebProxyScriptHelper.cs
- SafeEventHandle.cs
- PanelDesigner.cs
- LinqDataSourceView.cs
- MissingManifestResourceException.cs
- PropertyTabAttribute.cs
- AdapterDictionary.cs
- HwndSourceKeyboardInputSite.cs
- ArgumentOutOfRangeException.cs
- UmAlQuraCalendar.cs
- CodeComment.cs
- SecurityTimestamp.cs
- WebPartHelpVerb.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- TreeViewDesigner.cs
- SmtpDigestAuthenticationModule.cs
- StylusCaptureWithinProperty.cs
- AsymmetricKeyExchangeFormatter.cs
- EnumValAlphaComparer.cs
- EllipticalNodeOperations.cs
- TargetFrameworkAttribute.cs
- XmlDocument.cs
- NumericUpDownAcceleration.cs
- SoapClientMessage.cs
- adornercollection.cs
- XXXInfos.cs
- Rfc2898DeriveBytes.cs
- RelationshipFixer.cs
- LineServices.cs
- SafeEventLogWriteHandle.cs
- XPathNodeIterator.cs
- LinkTarget.cs
- DbModificationCommandTree.cs
- WindowsButton.cs
- GatewayDefinition.cs
- WindowsListViewItemStartMenu.cs
- XmlSchemaInfo.cs
- FullTextLine.cs
- PartialClassGenerationTaskInternal.cs
- QuerySubExprEliminator.cs
- ConfigXmlElement.cs
- DateTime.cs
- OSFeature.cs
- UnsignedPublishLicense.cs
- XmlNodeWriter.cs
- StreamGeometry.cs
- RoutedEventHandlerInfo.cs
- MappingSource.cs
- JsonWriter.cs
- MULTI_QI.cs
- CharacterBuffer.cs
- RequestValidator.cs
- HttpWrapper.cs
- CapabilitiesUse.cs
- FrameworkElementFactory.cs
- EmptyElement.cs
- WindowsScrollBar.cs
- DependentTransaction.cs
- BrushValueSerializer.cs
- FixedSOMPageConstructor.cs
- OdbcException.cs
- SoapReflectionImporter.cs
- PropertyDescriptor.cs
- BitmapEffectGroup.cs
- TimeSpanValidatorAttribute.cs
- PolyLineSegment.cs
- PrinterUnitConvert.cs
- XmlSchemaSimpleTypeRestriction.cs
- XmlSchemaSequence.cs
- DataColumnChangeEvent.cs
- CacheDependency.cs
- ColumnResizeUndoUnit.cs
- QueryResultOp.cs
- SessionEndingEventArgs.cs
- OutOfMemoryException.cs
- QueryAccessibilityHelpEvent.cs
- CatalogZone.cs
- _SslStream.cs