Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / XPath / Internal / ResetableIterator.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- IssuedTokenClientCredential.cs
- TemplateEditingFrame.cs
- RegionIterator.cs
- UnionExpr.cs
- DynamicRouteExpression.cs
- ServiceNameElementCollection.cs
- Wildcard.cs
- ManagedFilter.cs
- ControlCollection.cs
- XmlUtil.cs
- FieldToken.cs
- Message.cs
- SessionParameter.cs
- CriticalExceptions.cs
- ContractInferenceHelper.cs
- HtmlContainerControl.cs
- StylusPointCollection.cs
- ResourcePermissionBase.cs
- StorageInfo.cs
- SurrogateEncoder.cs
- LayoutEditorPart.cs
- Lease.cs
- XdrBuilder.cs
- NativeActivityFaultContext.cs
- StatusBarDrawItemEvent.cs
- ResourceFallbackManager.cs
- ModelFunctionTypeElement.cs
- SoapSchemaImporter.cs
- SchemaTypeEmitter.cs
- FileDataSource.cs
- PointHitTestResult.cs
- ObjectNavigationPropertyMapping.cs
- WorkflowHostingResponseContext.cs
- SHA1Managed.cs
- ResourceManagerWrapper.cs
- Asn1IntegerConverter.cs
- Listen.cs
- SettingsPropertyIsReadOnlyException.cs
- ActivityDesigner.cs
- Point.cs
- CompositeActivityCodeGenerator.cs
- ActiveDocumentEvent.cs
- CodeTypeDeclaration.cs
- DataSvcMapFileSerializer.cs
- FixedSOMFixedBlock.cs
- TypedAsyncResult.cs
- InheritanceAttribute.cs
- MethodExpression.cs
- SafePEFileHandle.cs
- SoapCodeExporter.cs
- exports.cs
- CurrentChangedEventManager.cs
- VisualBrush.cs
- MetadataCollection.cs
- ControlCachePolicy.cs
- TreeNodeCollectionEditor.cs
- WinFormsSecurity.cs
- UrlPath.cs
- RoamingStoreFile.cs
- DoubleSumAggregationOperator.cs
- Win32SafeHandles.cs
- NotSupportedException.cs
- LayoutUtils.cs
- UserControlCodeDomTreeGenerator.cs
- HttpHeaderCollection.cs
- DirectoryNotFoundException.cs
- Point3DKeyFrameCollection.cs
- AxHost.cs
- PathSegmentCollection.cs
- Int64AnimationUsingKeyFrames.cs
- AutoSizeToolBoxItem.cs
- HotCommands.cs
- PartialTrustHelpers.cs
- WebPartCollection.cs
- OracleConnection.cs
- Tracer.cs
- HTTPNotFoundHandler.cs
- DeploymentExceptionMapper.cs
- EntitySetDataBindingList.cs
- DataTableReaderListener.cs
- WebBrowser.cs
- DecimalConverter.cs
- ZipQueryOperator.cs
- DrawingCollection.cs
- StateItem.cs
- ByteAnimationBase.cs
- VarInfo.cs
- TypeDescriptionProviderAttribute.cs
- LassoHelper.cs
- ListBoxChrome.cs
- IApplicationTrustManager.cs
- _DigestClient.cs
- DBSqlParserTableCollection.cs
- OleStrCAMarshaler.cs
- SynchronizingStream.cs
- AsyncPostBackErrorEventArgs.cs
- Preprocessor.cs
- _HTTPDateParse.cs
- EntityObject.cs
- DockProviderWrapper.cs