Code:
/ FX-1434 / FX-1434 / 1.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
- Point3DKeyFrameCollection.cs
- ScriptReferenceBase.cs
- UnsafeNativeMethods.cs
- _LoggingObject.cs
- XmlObjectSerializerReadContextComplex.cs
- SupportedAddressingMode.cs
- OleDbParameterCollection.cs
- XmlWriter.cs
- SigningProgress.cs
- OdbcDataAdapter.cs
- DataGridCellEditEndingEventArgs.cs
- BufferModeSettings.cs
- DashStyle.cs
- HandledEventArgs.cs
- SqlCaseSimplifier.cs
- ListViewItemSelectionChangedEvent.cs
- WeakReference.cs
- ConstraintManager.cs
- PartManifestEntry.cs
- DebugView.cs
- PrintController.cs
- HttpHandler.cs
- _StreamFramer.cs
- CommandID.cs
- NotSupportedException.cs
- MetadataPropertyvalue.cs
- SqlConnectionHelper.cs
- CallContext.cs
- DynamicRouteExpression.cs
- CompiledIdentityConstraint.cs
- DeviceContexts.cs
- StringToken.cs
- EntityDataSourceMemberPath.cs
- MembershipSection.cs
- XmlSchemaImporter.cs
- WindowsListViewItemCheckBox.cs
- UInt32Converter.cs
- ProgressBarBrushConverter.cs
- RegisteredHiddenField.cs
- InternalCache.cs
- ElementProxy.cs
- WebPartEventArgs.cs
- EndpointDispatcherTable.cs
- SQLBoolean.cs
- Walker.cs
- ContentFileHelper.cs
- Message.cs
- QueryOutputWriterV1.cs
- StringArrayConverter.cs
- AssertFilter.cs
- Adorner.cs
- DataBinder.cs
- Rect3D.cs
- Run.cs
- PrintPageEvent.cs
- TrackingMemoryStreamFactory.cs
- NativeRecognizer.cs
- ClrProviderManifest.cs
- TextEditorMouse.cs
- ImageSourceValueSerializer.cs
- EntityViewGenerationAttribute.cs
- PrefixQName.cs
- BuildManager.cs
- SwitchElementsCollection.cs
- XmlSchemaAttributeGroup.cs
- Method.cs
- SchemaComplexType.cs
- ListViewDataItem.cs
- EnumBuilder.cs
- TrackBar.cs
- DbRetry.cs
- XmlMembersMapping.cs
- ImageSourceTypeConverter.cs
- ContextStack.cs
- HighlightVisual.cs
- Site.cs
- UrlAuthFailedErrorFormatter.cs
- M3DUtil.cs
- Drawing.cs
- Rect3D.cs
- DataTableReaderListener.cs
- NameSpaceEvent.cs
- SchemaImporter.cs
- SQLInt64Storage.cs
- Bits.cs
- DecoratedNameAttribute.cs
- StandardOleMarshalObject.cs
- WebResponse.cs
- ADMembershipProvider.cs
- GridViewEditEventArgs.cs
- ComboBoxDesigner.cs
- TextTreeObjectNode.cs
- HttpCacheParams.cs
- RSAOAEPKeyExchangeDeformatter.cs
- LassoHelper.cs
- WebCategoryAttribute.cs
- PeerChannelFactory.cs
- SizeF.cs
- CultureSpecificStringDictionary.cs
- SpanIndex.cs