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
- HwndHostAutomationPeer.cs
- namescope.cs
- Vector3DConverter.cs
- GridViewRowEventArgs.cs
- NameValueCache.cs
- LinqExpressionNormalizer.cs
- WebPartEventArgs.cs
- PropertyCollection.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- URL.cs
- PartialCachingControl.cs
- AddressHeader.cs
- EditorZoneBase.cs
- RegexBoyerMoore.cs
- DescendentsWalkerBase.cs
- MD5CryptoServiceProvider.cs
- Encoder.cs
- DesignerFrame.cs
- NamespaceEmitter.cs
- CheckBox.cs
- QuotedPrintableStream.cs
- FontResourceCache.cs
- __ComObject.cs
- DataControlFieldCell.cs
- NativeMethods.cs
- ArglessEventHandlerProxy.cs
- DbDeleteCommandTree.cs
- WebBrowserDocumentCompletedEventHandler.cs
- AuthenticateEventArgs.cs
- DataGridViewRowCollection.cs
- SqlGenericUtil.cs
- SerializationTrace.cs
- Encoding.cs
- StylusPointProperties.cs
- ImageSource.cs
- HttpModuleActionCollection.cs
- TransactionTraceIdentifier.cs
- PathFigureCollectionConverter.cs
- TextTreeNode.cs
- WindowsIdentity.cs
- PropertyGridEditorPart.cs
- FontFaceLayoutInfo.cs
- XmlSchemaSimpleContent.cs
- ChineseLunisolarCalendar.cs
- RC2.cs
- PermissionSetEnumerator.cs
- XmlChoiceIdentifierAttribute.cs
- InputLangChangeRequestEvent.cs
- __Filters.cs
- InstallerTypeAttribute.cs
- EntityClassGenerator.cs
- TagMapCollection.cs
- COM2PictureConverter.cs
- Assert.cs
- AdRotator.cs
- Knowncolors.cs
- KeyboardDevice.cs
- RegisterResponseInfo.cs
- ProtectedConfigurationSection.cs
- CompositeDataBoundControl.cs
- RpcAsyncResult.cs
- SqlTriggerAttribute.cs
- InkCanvasFeedbackAdorner.cs
- AssemblyResourceLoader.cs
- SaveFileDialog.cs
- MobileControlsSectionHandler.cs
- CodeDelegateInvokeExpression.cs
- InterleavedZipPartStream.cs
- SectionUpdates.cs
- ExpressionDumper.cs
- WindowsScrollBar.cs
- MailMessage.cs
- Polyline.cs
- ISessionStateStore.cs
- XmlMemberMapping.cs
- RemoteWebConfigurationHostServer.cs
- FormView.cs
- Int32RectConverter.cs
- CompilerGlobalScopeAttribute.cs
- XdrBuilder.cs
- PropertyDescriptorCollection.cs
- TableCellCollection.cs
- LinkArea.cs
- IISMapPath.cs
- HostnameComparisonMode.cs
- CommonObjectSecurity.cs
- ADConnectionHelper.cs
- CqlParser.cs
- PrePostDescendentsWalker.cs
- TransformerTypeCollection.cs
- WebCategoryAttribute.cs
- EdmItemCollection.cs
- EmptyEnumerable.cs
- KeySpline.cs
- PinnedBufferMemoryStream.cs
- SimplePropertyEntry.cs
- XmlValidatingReader.cs
- MasterPageBuildProvider.cs
- SystemInfo.cs
- Exceptions.cs