Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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
- MediaScriptCommandRoutedEventArgs.cs
- TabPageDesigner.cs
- RangeBase.cs
- OpenFileDialog.cs
- XmlHierarchicalDataSourceView.cs
- HttpValueCollection.cs
- _CookieModule.cs
- EventPrivateKey.cs
- TextSerializer.cs
- RangeValueProviderWrapper.cs
- OleDbPermission.cs
- PropertyPathConverter.cs
- WasHostedComPlusFactory.cs
- UpdatePanelControlTrigger.cs
- StyleCollectionEditor.cs
- BoolExpr.cs
- CommonDialog.cs
- DesignerAdRotatorAdapter.cs
- MouseEventArgs.cs
- HtmlTable.cs
- HtmlFormWrapper.cs
- NominalTypeEliminator.cs
- HtmlValidatorAdapter.cs
- EntityWithKeyStrategy.cs
- CurrentTimeZone.cs
- TypeLoadException.cs
- RelationshipManager.cs
- ConfigurationSectionGroupCollection.cs
- AppDomainAttributes.cs
- GetTokenRequest.cs
- Separator.cs
- CompressedStack.cs
- Int16Storage.cs
- ContentDisposition.cs
- DoubleLink.cs
- ButtonFieldBase.cs
- ComPlusDiagnosticTraceRecords.cs
- InvalidOperationException.cs
- XPathDocumentNavigator.cs
- BindUriHelper.cs
- DnsEndPoint.cs
- MsmqActivation.cs
- StringAnimationUsingKeyFrames.cs
- ProvidersHelper.cs
- ImageIndexConverter.cs
- LinqTreeNodeEvaluator.cs
- BoundPropertyEntry.cs
- StrongNameUtility.cs
- PathData.cs
- NativeMethods.cs
- FixedSchema.cs
- System.Data.OracleClient_BID.cs
- MSHTMLHostUtil.cs
- InkPresenterAutomationPeer.cs
- ListViewAutomationPeer.cs
- Matrix3D.cs
- DbConnectionStringCommon.cs
- MetadataHelper.cs
- WebBrowserProgressChangedEventHandler.cs
- PlatformCulture.cs
- TextParaClient.cs
- sitestring.cs
- StylusPointPropertyInfoDefaults.cs
- WebPartTransformerCollection.cs
- DispatcherFrame.cs
- BuildProvider.cs
- AsymmetricSignatureFormatter.cs
- Utility.cs
- NativeWrapper.cs
- DataGridViewCellPaintingEventArgs.cs
- DispatcherExceptionEventArgs.cs
- ListSurrogate.cs
- TrackingProfileCache.cs
- ExpressionConverter.cs
- SQLCharsStorage.cs
- OutputCacheProfile.cs
- InputLanguageProfileNotifySink.cs
- _IPv4Address.cs
- XmlDataProvider.cs
- ModifyActivitiesPropertyDescriptor.cs
- AssemblyCache.cs
- SecureConversationServiceElement.cs
- DataGridRowClipboardEventArgs.cs
- LinqDataSourceContextEventArgs.cs
- LeftCellWrapper.cs
- PasswordRecoveryAutoFormat.cs
- SymbolMethod.cs
- WindowsGraphics2.cs
- GridViewSelectEventArgs.cs
- MailDefinition.cs
- SessionEndingEventArgs.cs
- AsmxEndpointPickerExtension.cs
- PauseStoryboard.cs
- UnconditionalPolicy.cs
- ListViewItem.cs
- XmlWrappingReader.cs
- MultiDataTrigger.cs
- MsmqBindingFilter.cs
- ErrorEventArgs.cs