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
- ManifestSignedXml.cs
- StringUtil.cs
- SqlTriggerContext.cs
- GenericWebPart.cs
- EndEvent.cs
- CustomAssemblyResolver.cs
- DesignerPainter.cs
- ListBox.cs
- SqlUdtInfo.cs
- CodeIdentifier.cs
- StructuralType.cs
- RSAPKCS1KeyExchangeFormatter.cs
- DesignTimeParseData.cs
- IntegerValidatorAttribute.cs
- HandledEventArgs.cs
- FactoryGenerator.cs
- FutureFactory.cs
- MediaElement.cs
- PreviewPrintController.cs
- UInt16Converter.cs
- ConfigXmlText.cs
- ReferentialConstraint.cs
- PageTheme.cs
- RecordBuilder.cs
- LOSFormatter.cs
- XmlNodeChangedEventManager.cs
- BinaryReader.cs
- LazyTextWriterCreator.cs
- SubMenuStyleCollectionEditor.cs
- ProjectionCamera.cs
- RelationshipEndCollection.cs
- TrustLevel.cs
- PlainXmlDeserializer.cs
- GeometryModel3D.cs
- DesignerDeviceConfig.cs
- TextClipboardData.cs
- VisemeEventArgs.cs
- EventLogPermission.cs
- SplitterDesigner.cs
- ChangeBlockUndoRecord.cs
- HandoffBehavior.cs
- SqlUdtInfo.cs
- MSG.cs
- ExpressionNormalizer.cs
- SimplePropertyEntry.cs
- DataTableMapping.cs
- BigInt.cs
- TemplateXamlTreeBuilder.cs
- NameValuePermission.cs
- EncoderFallback.cs
- CompilationUnit.cs
- BaseParaClient.cs
- FaultContractInfo.cs
- FreeFormDesigner.cs
- Pair.cs
- EventEntry.cs
- DataBindingHandlerAttribute.cs
- WorkflowFileItem.cs
- ColumnHeaderConverter.cs
- SQLDecimalStorage.cs
- AdjustableArrowCap.cs
- SHA1.cs
- PropertyChangedEventArgs.cs
- BmpBitmapEncoder.cs
- XmlSchemaImporter.cs
- LocalizationParserHooks.cs
- SQLInt16.cs
- XPathNodeInfoAtom.cs
- ApplicationContext.cs
- RuleSetBrowserDialog.cs
- DesignerAttribute.cs
- FixUpCollection.cs
- EventDescriptor.cs
- WorkflowFileItem.cs
- WindowsEditBox.cs
- AccessDataSourceView.cs
- AppDomainShutdownMonitor.cs
- WorkflowQueueInfo.cs
- StylusPointProperty.cs
- TextureBrush.cs
- MultilineStringConverter.cs
- NotCondition.cs
- WebBrowser.cs
- UshortList2.cs
- XamlWriter.cs
- DbTransaction.cs
- WebRequestModulesSection.cs
- SafeLibraryHandle.cs
- XmlBinaryWriter.cs
- ContractReference.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- _SecureChannel.cs
- EncodingTable.cs
- CheckedPointers.cs
- XmlSchemaSimpleContent.cs
- ContainerVisual.cs
- ObjectSecurity.cs
- BinHexDecoder.cs
- QuaternionAnimation.cs
- LineBreakRecord.cs