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 / ResetableIterator.cs / 1 / 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. //------------------------------------------------------------------------------ //// 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
- ListViewTableRow.cs
- DataList.cs
- ISessionStateStore.cs
- TileBrush.cs
- StringArrayEditor.cs
- DataViewManager.cs
- PagerSettings.cs
- InvalidComObjectException.cs
- RelationshipDetailsRow.cs
- LightweightEntityWrapper.cs
- PropertyIdentifier.cs
- EnumerableRowCollection.cs
- AstTree.cs
- PageBuildProvider.cs
- ZeroOpNode.cs
- MetadataWorkspace.cs
- Speller.cs
- FileDialog.cs
- DropDownList.cs
- PolyBezierSegment.cs
- GCHandleCookieTable.cs
- RevocationPoint.cs
- XmlSchemaObject.cs
- DataFieldConverter.cs
- FontInfo.cs
- HideDisabledControlAdapter.cs
- BlurBitmapEffect.cs
- UnsafeNativeMethodsMilCoreApi.cs
- XmlAttribute.cs
- ExpressionVisitor.cs
- DataKeyArray.cs
- SqlProcedureAttribute.cs
- FileDialog_Vista.cs
- smtppermission.cs
- RedirectionProxy.cs
- ScaleTransform3D.cs
- ButtonField.cs
- Region.cs
- Tracer.cs
- BaseUriHelper.cs
- Mouse.cs
- Visual3D.cs
- BinaryReader.cs
- Point.cs
- LocatorBase.cs
- DriveNotFoundException.cs
- ToolStripDropDownClosedEventArgs.cs
- UnsafeCollabNativeMethods.cs
- DocumentGrid.cs
- NetSectionGroup.cs
- XmlQueryCardinality.cs
- BitmapFrameEncode.cs
- WindowsStartMenu.cs
- TimeEnumHelper.cs
- validation.cs
- WebPartAuthorizationEventArgs.cs
- StorageRoot.cs
- PersianCalendar.cs
- ProviderConnectionPointCollection.cs
- RelationshipWrapper.cs
- TypeConverters.cs
- BuildDependencySet.cs
- EventLogHandle.cs
- LoadGrammarCompletedEventArgs.cs
- RemotingConfigParser.cs
- TreeViewImageIndexConverter.cs
- ToolStripDropDown.cs
- InputMethodStateChangeEventArgs.cs
- SystemIPv4InterfaceProperties.cs
- Condition.cs
- GroupQuery.cs
- ListBoxAutomationPeer.cs
- TreeWalker.cs
- XmlSchemaCompilationSettings.cs
- InputScopeAttribute.cs
- Viewport2DVisual3D.cs
- BooleanKeyFrameCollection.cs
- ApplicationDirectory.cs
- XmlRawWriter.cs
- WebEvents.cs
- AngleUtil.cs
- SqlDataSourceRefreshSchemaForm.cs
- Opcode.cs
- MessageContractImporter.cs
- DynamicPropertyHolder.cs
- PropertyGroupDescription.cs
- SrgsDocumentParser.cs
- SoapFormatterSinks.cs
- ReflectEventDescriptor.cs
- RSAOAEPKeyExchangeFormatter.cs
- LinqDataSourceDisposeEventArgs.cs
- HttpCacheParams.cs
- CommonDialog.cs
- SettingsProperty.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- CodeDirectoryCompiler.cs
- ISessionStateStore.cs
- TextAction.cs
- NotifyParentPropertyAttribute.cs
- StickyNoteHelper.cs