Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / XPath / Internal / ResetableIterator.cs / 1305376 / ResetableIterator.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 abstract class ResetableIterator : XPathNodeIterator { // the best place for this constructors to be is XPathNodeIterator, to avoid DCR at this time let's ground them here public ResetableIterator() { base.count = -1; } protected ResetableIterator(ResetableIterator other) { base.count = other.count; } protected void ResetCount() { base.count = -1; } public abstract void Reset(); public virtual bool MoveToPosition(int pos) { Reset(); for(int i = CurrentPosition; i < pos ; i ++) { if(!MoveNext()) { return false; } } return true; } // Contruct extension: CurrentPosition should return 0 if MoveNext() wasn't called after Reset() // (behavior is not defined for XPathNodeIterator) public abstract override int CurrentPosition { get; } } } // 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
- Lease.cs
- Point4D.cs
- ScriptReference.cs
- TextContainerChangeEventArgs.cs
- Dictionary.cs
- PropertyDescriptorCollection.cs
- ProcessStartInfo.cs
- DocumentReference.cs
- MonitoringDescriptionAttribute.cs
- UriTemplateMatch.cs
- SequentialOutput.cs
- DesignTimeXamlWriter.cs
- RoutingChannelExtension.cs
- EpmContentSerializerBase.cs
- TemplateBindingExtensionConverter.cs
- WorkflowElementDialog.cs
- Geometry3D.cs
- SQLSingleStorage.cs
- ReflectionTypeLoadException.cs
- SchemaImporterExtensionElementCollection.cs
- MarkupCompilePass1.cs
- ParameterCollection.cs
- ViewBase.cs
- WebControlsSection.cs
- HttpListenerException.cs
- ListView.cs
- ComponentResourceKeyConverter.cs
- XslCompiledTransform.cs
- WorkingDirectoryEditor.cs
- WebMessageEncodingElement.cs
- DefaultShape.cs
- SQLInt64.cs
- MultipleViewProviderWrapper.cs
- DocumentViewer.cs
- WebPartEditorOkVerb.cs
- HttpTransportBindingElement.cs
- OneOf.cs
- ScrollViewer.cs
- ListViewItem.cs
- MessageContractExporter.cs
- DataControlFieldHeaderCell.cs
- QilInvokeEarlyBound.cs
- TableTextElementCollectionInternal.cs
- _ConnectionGroup.cs
- RelationshipType.cs
- RootAction.cs
- FileIOPermission.cs
- PeerCollaboration.cs
- InstanceValue.cs
- AnnotationResourceCollection.cs
- ColumnResizeUndoUnit.cs
- BmpBitmapDecoder.cs
- Image.cs
- RotateTransform.cs
- DrawingImage.cs
- RemotingServices.cs
- HttpModuleActionCollection.cs
- CommonObjectSecurity.cs
- handlecollector.cs
- BamlResourceSerializer.cs
- DBPropSet.cs
- TraceHandler.cs
- PackageProperties.cs
- InstanceData.cs
- HitTestWithPointDrawingContextWalker.cs
- FontFamilyIdentifier.cs
- SvcMapFileLoader.cs
- UriScheme.cs
- Misc.cs
- TextBoxView.cs
- ValueProviderWrapper.cs
- NamespaceCollection.cs
- BasicCellRelation.cs
- BaseParagraph.cs
- PageAction.cs
- ExecutionProperties.cs
- ResourcePool.cs
- OAVariantLib.cs
- ManipulationStartingEventArgs.cs
- MaskedTextBox.cs
- TemplateColumn.cs
- TextTreePropertyUndoUnit.cs
- EncodingNLS.cs
- MatchAttribute.cs
- FreezableCollection.cs
- LOSFormatter.cs
- AlternateViewCollection.cs
- ReadOnlyPropertyMetadata.cs
- HtmlSelect.cs
- SegmentInfo.cs
- BulletChrome.cs
- serverconfig.cs
- FullTextState.cs
- ProcessRequestArgs.cs
- XmlTextReader.cs
- MeshGeometry3D.cs
- BufferedReadStream.cs
- LicFileLicenseProvider.cs
- QilFunction.cs
- HttpHandlerActionCollection.cs