Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / Xml / System / Xml / XPath / Internal / XPathSelectionIterator.cs / 1 / XPathSelectionIterator.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; // We need this wrapper object to: // 1. Calculate position // 2. Protect internal query.Current from user who may call MoveNext(). internal class XPathSelectionIterator : ResetableIterator { private XPathNavigator nav; private Query query; private int position; internal XPathSelectionIterator(XPathNavigator nav, Query query) { this.nav = nav.Clone(); this.query = query; } protected XPathSelectionIterator(XPathSelectionIterator it) { this.nav = it.nav.Clone(); this.query = (Query) it.query.Clone(); this.position = it.position; } public override void Reset() { this.query.Reset(); } public override bool MoveNext() { XPathNavigator n = query.Advance(); if( n != null ) { position++; if (!nav.MoveTo(n)) { nav = n.Clone(); } return true; } return false; } public override int Count { get { return query.Count; } } public override XPathNavigator Current { get { return nav; } } public override int CurrentPosition { get { return position; } } public override XPathNodeIterator Clone() { return new XPathSelectionIterator(this); } } } // 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
- ApplicationTrust.cs
- ColorTranslator.cs
- Trigger.cs
- TileBrush.cs
- DocumentStatusResources.cs
- BitmapEffectGroup.cs
- WindowProviderWrapper.cs
- HebrewCalendar.cs
- X509ClientCertificateAuthenticationElement.cs
- MouseButton.cs
- LocationUpdates.cs
- CodeDomSerializationProvider.cs
- AsyncPostBackTrigger.cs
- SerializationStore.cs
- QualifiedCellIdBoolean.cs
- DataControlFieldCell.cs
- PreservationFileReader.cs
- XPathChildIterator.cs
- StylusDownEventArgs.cs
- HttpListenerPrefixCollection.cs
- WebPartPersonalization.cs
- TreeNodeMouseHoverEvent.cs
- ResourceWriter.cs
- QueryContinueDragEventArgs.cs
- AffineTransform3D.cs
- RowBinding.cs
- Ref.cs
- InputLanguageSource.cs
- UserPreferenceChangingEventArgs.cs
- OutOfMemoryException.cs
- TextSearch.cs
- VisualStyleTypesAndProperties.cs
- IItemProperties.cs
- GetMemberBinder.cs
- MessageSmuggler.cs
- ClientSponsor.cs
- IndexOutOfRangeException.cs
- DataIdProcessor.cs
- TypeSystemProvider.cs
- SafeTokenHandle.cs
- LambdaCompiler.cs
- OdbcInfoMessageEvent.cs
- FileAuthorizationModule.cs
- CommonDialog.cs
- ProgressBarHighlightConverter.cs
- DataSourceControlBuilder.cs
- HistoryEventArgs.cs
- oledbmetadatacollectionnames.cs
- ISO2022Encoding.cs
- securitycriticaldataClass.cs
- SafeHGlobalHandleCritical.cs
- ChangeNode.cs
- DefaultSettingsSection.cs
- UnsafeNativeMethods.cs
- TileModeValidation.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- TextServicesProperty.cs
- PersonalizationProvider.cs
- HttpPostedFile.cs
- StorageAssociationTypeMapping.cs
- HealthMonitoringSection.cs
- BitmapEffectGroup.cs
- AdapterDictionary.cs
- InlinedAggregationOperator.cs
- XmlSerializerSection.cs
- SchemaDeclBase.cs
- ContractComponent.cs
- XmlSchemaProviderAttribute.cs
- Nullable.cs
- Events.cs
- FileDialogCustomPlacesCollection.cs
- RedistVersionInfo.cs
- TextRangeProviderWrapper.cs
- ToolStripLabel.cs
- LocalizedNameDescriptionPair.cs
- EditableTreeList.cs
- EventlogProvider.cs
- HtmlShimManager.cs
- XslVisitor.cs
- TypeToken.cs
- ProxyGenerator.cs
- RSAProtectedConfigurationProvider.cs
- SafeCloseHandleCritical.cs
- CultureTable.cs
- TimelineGroup.cs
- BitSet.cs
- RegexInterpreter.cs
- IxmlLineInfo.cs
- sitestring.cs
- FileCodeGroup.cs
- PeerInputChannel.cs
- DataGridViewColumnConverter.cs
- BackoffTimeoutHelper.cs
- BlockUIContainer.cs
- FeatureSupport.cs
- EventsTab.cs
- LayoutUtils.cs
- XPathNodeInfoAtom.cs
- SymDocumentType.cs
- ConfigurationFileMap.cs