Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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
- DataObjectMethodAttribute.cs
- TableCellAutomationPeer.cs
- SmiEventSink_DeferedProcessing.cs
- ToolStripSettings.cs
- XmlBaseWriter.cs
- SystemColorTracker.cs
- AdapterUtil.cs
- SqlBuffer.cs
- DataFormats.cs
- Unit.cs
- AuthenticationSection.cs
- ViewCellRelation.cs
- InheritanceContextHelper.cs
- EventRoute.cs
- SelectionChangedEventArgs.cs
- ServiceNameCollection.cs
- MessageQueueAccessControlEntry.cs
- BaseTemplatedMobileComponentEditor.cs
- ObjectDisposedException.cs
- ListViewGroupItemCollection.cs
- IncrementalCompileAnalyzer.cs
- UnsafeNativeMethods.cs
- FontUnitConverter.cs
- ImageField.cs
- MemberAssignment.cs
- XNodeValidator.cs
- PieceDirectory.cs
- OdbcConnectionFactory.cs
- HtmlShimManager.cs
- SymmetricAlgorithm.cs
- XmlDataLoader.cs
- ChangeBlockUndoRecord.cs
- dsa.cs
- FaultConverter.cs
- QilReference.cs
- OpenFileDialog.cs
- Timer.cs
- Interlocked.cs
- PropertyIDSet.cs
- SubclassTypeValidatorAttribute.cs
- UnsafeNativeMethods.cs
- CodeMethodMap.cs
- IDataContractSurrogate.cs
- VisualTreeHelper.cs
- MenuItem.cs
- XmlNamespaceDeclarationsAttribute.cs
- MetadataFile.cs
- QilPatternVisitor.cs
- FileChangesMonitor.cs
- RemotingConfigParser.cs
- StateDesignerConnector.cs
- ColumnResizeAdorner.cs
- GlyphElement.cs
- NetMsmqBindingElement.cs
- DataGridTablesFactory.cs
- Int64Converter.cs
- PeerNameRegistration.cs
- OdbcReferenceCollection.cs
- DataObjectSettingDataEventArgs.cs
- BamlMapTable.cs
- DesignerDataTable.cs
- AffineTransform3D.cs
- filewebrequest.cs
- TriggerActionCollection.cs
- GenericsInstances.cs
- BindingNavigator.cs
- TypeNameParser.cs
- MapPathBasedVirtualPathProvider.cs
- StatusBarAutomationPeer.cs
- _PooledStream.cs
- AttributeAction.cs
- InputElement.cs
- RawContentTypeMapper.cs
- ManipulationPivot.cs
- WmlObjectListAdapter.cs
- CultureTableRecord.cs
- DesignerHierarchicalDataSourceView.cs
- NetCodeGroup.cs
- MemberDomainMap.cs
- CanonicalXml.cs
- hresults.cs
- EventLogPermissionEntry.cs
- BindingCollection.cs
- CacheRequest.cs
- InternalSafeNativeMethods.cs
- ApplyTemplatesAction.cs
- _IPv6Address.cs
- BindingBase.cs
- ObjectListTitleAttribute.cs
- SmiContext.cs
- TextOnlyOutput.cs
- ByteStreamBufferedMessageData.cs
- EventLogEntryCollection.cs
- ClientSettingsStore.cs
- _TLSstream.cs
- XmlDocumentType.cs
- HtmlTable.cs
- BulletDecorator.cs
- HtmlSelect.cs
- _KerberosClient.cs