Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PagerStyle.cs
- LogicalTreeHelper.cs
- XmlChildNodes.cs
- XPathNavigatorKeyComparer.cs
- Bits.cs
- HandledEventArgs.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- BufferedWebEventProvider.cs
- LinkLabelLinkClickedEvent.cs
- TemplateField.cs
- AdapterDictionary.cs
- SpinWait.cs
- KerberosTicketHashIdentifierClause.cs
- TextOptions.cs
- PartialCachingAttribute.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- HebrewCalendar.cs
- ComponentConverter.cs
- CodeExpressionStatement.cs
- SchemaAttDef.cs
- DataControlLinkButton.cs
- DataQuery.cs
- ToolStripPanel.cs
- SmtpLoginAuthenticationModule.cs
- PngBitmapDecoder.cs
- SafeBitVector32.cs
- StructuralCache.cs
- ItemDragEvent.cs
- PhotoPrintingIntent.cs
- PersistenceProviderElement.cs
- PropertyConverter.cs
- Byte.cs
- WmlMobileTextWriter.cs
- SecondaryViewProvider.cs
- OutputCacheModule.cs
- DrawingAttributesDefaultValueFactory.cs
- RelatedCurrencyManager.cs
- Site.cs
- ThousandthOfEmRealPoints.cs
- Char.cs
- QuaternionKeyFrameCollection.cs
- TraceLevelHelper.cs
- CodeComment.cs
- QuaternionRotation3D.cs
- ClaimTypes.cs
- DefinitionBase.cs
- TextContainer.cs
- DataGridHeaderBorder.cs
- RolePrincipal.cs
- BrowserInteropHelper.cs
- ControlTemplate.cs
- TimeZone.cs
- EventDescriptorCollection.cs
- CatalogZone.cs
- ObjectStorage.cs
- CommandBinding.cs
- DependencyObjectProvider.cs
- DropTarget.cs
- Pair.cs
- ClickablePoint.cs
- DataRecordInternal.cs
- Pair.cs
- HtmlFormParameterWriter.cs
- RSAPKCS1KeyExchangeFormatter.cs
- ToolStripCollectionEditor.cs
- NavigatingCancelEventArgs.cs
- Selection.cs
- XmlElementAttribute.cs
- NativeMethods.cs
- AlternateView.cs
- ContextMenuStrip.cs
- DataKey.cs
- DbConnectionPoolCounters.cs
- StackBuilderSink.cs
- Brush.cs
- PropertyDescriptors.cs
- BigInt.cs
- ToolStripItemDataObject.cs
- TableColumn.cs
- UpDownEvent.cs
- EmptyElement.cs
- UserControlCodeDomTreeGenerator.cs
- StaticSiteMapProvider.cs
- GPPOINT.cs
- HttpsTransportBindingElement.cs
- WindowsListViewGroup.cs
- PropertyInfo.cs
- AmbientLight.cs
- PerformanceCounterManager.cs
- FileDialog.cs
- CheckedPointers.cs
- SqlParameter.cs
- XmlEncodedRawTextWriter.cs
- ConditionalAttribute.cs
- CodeIdentifiers.cs
- MasterPage.cs
- DataServicePagingProviderWrapper.cs
- Geometry3D.cs
- Label.cs
- SystemIPAddressInformation.cs