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
- TextParaClient.cs
- ValidatedControlConverter.cs
- ParameterCollection.cs
- unsafenativemethodstextservices.cs
- QuotedStringFormatReader.cs
- BlurBitmapEffect.cs
- DataGridViewCellStyle.cs
- UnsafeNativeMethods.cs
- CompareInfo.cs
- SqlEnums.cs
- ConstrainedDataObject.cs
- PrivilegeNotHeldException.cs
- MappingModelBuildProvider.cs
- DBNull.cs
- RSAOAEPKeyExchangeFormatter.cs
- MemberRelationshipService.cs
- BindableAttribute.cs
- RelatedImageListAttribute.cs
- CompatibleComparer.cs
- CAGDesigner.cs
- Screen.cs
- ImageSource.cs
- TypeExtensions.cs
- HiddenFieldPageStatePersister.cs
- PropertyRecord.cs
- SkewTransform.cs
- dtdvalidator.cs
- XamlToRtfParser.cs
- EventRoute.cs
- HandleRef.cs
- DeleteHelper.cs
- ValidateNames.cs
- XPathDocumentBuilder.cs
- HelpEvent.cs
- Figure.cs
- MetabaseServerConfig.cs
- InputLanguage.cs
- TargetConverter.cs
- ModelChangedEventArgsImpl.cs
- SiteMapPath.cs
- SoapSchemaMember.cs
- Int32EqualityComparer.cs
- OverflowException.cs
- SecUtil.cs
- DigitShape.cs
- SqlCaseSimplifier.cs
- TabControlDesigner.cs
- Substitution.cs
- FontFaceLayoutInfo.cs
- PackageStore.cs
- FileUtil.cs
- ImportDesigner.xaml.cs
- Point3D.cs
- WebPartsSection.cs
- UnionCodeGroup.cs
- XmlCharCheckingWriter.cs
- MemberListBinding.cs
- EmptyStringExpandableObjectConverter.cs
- DoubleLinkList.cs
- MetadataItem_Static.cs
- bindurihelper.cs
- TextDecoration.cs
- IProvider.cs
- ObjectReaderCompiler.cs
- Button.cs
- PageBuildProvider.cs
- UDPClient.cs
- NamespaceEmitter.cs
- Preprocessor.cs
- ToolStripContentPanelDesigner.cs
- HttpModuleCollection.cs
- BypassElement.cs
- RowTypeElement.cs
- DataGridViewAccessibleObject.cs
- DragCompletedEventArgs.cs
- WindowsRichEditRange.cs
- PackageFilter.cs
- entityreference_tresulttype.cs
- AssemblyCache.cs
- SQLResource.cs
- MulticastDelegate.cs
- LastQueryOperator.cs
- WindowsSspiNegotiation.cs
- AutoGeneratedFieldProperties.cs
- TraceHwndHost.cs
- WebPartDisplayModeCancelEventArgs.cs
- _ProxyRegBlob.cs
- _ListenerAsyncResult.cs
- EdmError.cs
- FileSecurity.cs
- GraphicsPathIterator.cs
- Quaternion.cs
- MessageEncodingBindingElementImporter.cs
- OrderedDictionary.cs
- RenderData.cs
- TrustSection.cs
- WebPartConnectionsEventArgs.cs
- KeySpline.cs
- Configuration.cs
- XsltSettings.cs