Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / XPath / Internal / XPathSelectionIterator.cs / 1305376 / XPathSelectionIterator.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; // We need this wrapper object to: // 1. Calculate position // 2. Protect internal query.Current from user who may call MoveNext(). internal class XPathSelectionIterator : ResetableIterator { private XPathNavigator nav; private Query query; private int position; internal XPathSelectionIterator(XPathNavigator nav, Query query) { this.nav = nav.Clone(); this.query = query; } protected XPathSelectionIterator(XPathSelectionIterator it) { this.nav = it.nav.Clone(); this.query = (Query) it.query.Clone(); this.position = it.position; } public override void Reset() { this.query.Reset(); } public override bool MoveNext() { XPathNavigator n = query.Advance(); if( n != null ) { position++; if (!nav.MoveTo(n)) { nav = n.Clone(); } return true; } return false; } public override int Count { get { return query.Count; } } public override XPathNavigator Current { get { return nav; } } public override int CurrentPosition { get { return position; } } public override XPathNodeIterator Clone() { return new XPathSelectionIterator(this); } } } // 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
- ConfigurationSectionGroupCollection.cs
- XmlWriter.cs
- MediaElement.cs
- CollectionContainer.cs
- ExceptionUtility.cs
- PrintingPermissionAttribute.cs
- TextDecorationCollection.cs
- Int32Animation.cs
- WindowsScrollBarBits.cs
- DateTimeConverter.cs
- SafeArrayRankMismatchException.cs
- WebPartEditorOkVerb.cs
- BindStream.cs
- ByteStorage.cs
- ControlEvent.cs
- CollectionType.cs
- InvalidOleVariantTypeException.cs
- filewebrequest.cs
- SiteOfOriginContainer.cs
- RegexRunnerFactory.cs
- HeaderCollection.cs
- PlainXmlDeserializer.cs
- BindingsCollection.cs
- DynamicActionMessageFilter.cs
- DeviceFilterEditorDialog.cs
- HtmlTableRowCollection.cs
- WindowsImpersonationContext.cs
- XsltQilFactory.cs
- SqlRowUpdatedEvent.cs
- C14NUtil.cs
- IsolationInterop.cs
- Vector3DAnimationUsingKeyFrames.cs
- SchemaType.cs
- ToolStripPanelRenderEventArgs.cs
- ReversePositionQuery.cs
- BaseDataBoundControl.cs
- RightsManagementPermission.cs
- DataRecord.cs
- MultiPartWriter.cs
- ProgressChangedEventArgs.cs
- Input.cs
- MSHTMLHost.cs
- SeekStoryboard.cs
- AsymmetricKeyExchangeFormatter.cs
- TypeLoadException.cs
- arc.cs
- SelectedDatesCollection.cs
- AssemblyNameUtility.cs
- XslAstAnalyzer.cs
- XmlSchemaComplexContent.cs
- PinnedBufferMemoryStream.cs
- LayoutTable.cs
- xmlglyphRunInfo.cs
- DataControlImageButton.cs
- AppearanceEditorPart.cs
- ClosableStream.cs
- SerializationSectionGroup.cs
- FieldTemplateFactory.cs
- StreamingContext.cs
- TrackingRecord.cs
- ExpressionConverter.cs
- PropVariant.cs
- LockCookie.cs
- Update.cs
- DefaultBindingPropertyAttribute.cs
- ByteConverter.cs
- BamlRecordReader.cs
- DateTimeFormatInfo.cs
- SingleStorage.cs
- UpWmlPageAdapter.cs
- SynthesizerStateChangedEventArgs.cs
- XmlImplementation.cs
- XmlSchemaExternal.cs
- FormViewInsertEventArgs.cs
- UserValidatedEventArgs.cs
- IndentedWriter.cs
- HostVisual.cs
- SoapExtension.cs
- RectAnimationBase.cs
- CharacterMetrics.cs
- LoginUtil.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- ByteArrayHelperWithString.cs
- XmlWriter.cs
- FixedSOMLineCollection.cs
- JumpPath.cs
- CombinedGeometry.cs
- MimeTypeAttribute.cs
- TextViewDesigner.cs
- TableItemProviderWrapper.cs
- mansign.cs
- DockPattern.cs
- SHA512Managed.cs
- Byte.cs
- Gdiplus.cs
- TransactedBatchContext.cs
- FontResourceCache.cs
- Panel.cs
- OLEDB_Enum.cs
- WebExceptionStatus.cs