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
- WorkflowPersistenceService.cs
- DataServiceQueryException.cs
- RequestSecurityTokenForRemoteTokenFactory.cs
- SuppressMessageAttribute.cs
- SqlFunctions.cs
- AsyncPostBackErrorEventArgs.cs
- PropertyMapper.cs
- ProfessionalColorTable.cs
- AnimationException.cs
- RegisteredArrayDeclaration.cs
- UnsafeNativeMethods.cs
- TreeNodeCollection.cs
- BooleanStorage.cs
- GridSplitterAutomationPeer.cs
- ObjRef.cs
- DataProtection.cs
- ErrorWebPart.cs
- AllMembershipCondition.cs
- URLString.cs
- AttributeExtensions.cs
- ConditionalAttribute.cs
- LinkClickEvent.cs
- Translator.cs
- SqlParameter.cs
- ModelServiceImpl.cs
- ObjectListGeneralPage.cs
- SuppressIldasmAttribute.cs
- AssemblyInfo.cs
- DefaultTextStore.cs
- RelationshipConverter.cs
- ObjectTag.cs
- ResolveMatches11.cs
- BinHexEncoding.cs
- TextElementEditingBehaviorAttribute.cs
- TransformerInfo.cs
- TreeViewImageGenerator.cs
- HttpCachePolicyWrapper.cs
- PrincipalPermission.cs
- ScanQueryOperator.cs
- RelationshipDetailsCollection.cs
- LabelAutomationPeer.cs
- SmtpLoginAuthenticationModule.cs
- _TLSstream.cs
- MissingSatelliteAssemblyException.cs
- CharacterBufferReference.cs
- SqlDataSourceCommandParser.cs
- JulianCalendar.cs
- CompareValidator.cs
- SqlRetyper.cs
- ResXResourceSet.cs
- WorkflowMarkupSerializationProvider.cs
- CompiledRegexRunner.cs
- TraceUtility.cs
- UIElementCollection.cs
- SimpleRecyclingCache.cs
- ModelPerspective.cs
- WebExceptionStatus.cs
- ToolStripTemplateNode.cs
- MetricEntry.cs
- xsdvalidator.cs
- CatalogPartChrome.cs
- CachedPathData.cs
- CodeTypeParameterCollection.cs
- SizeF.cs
- Positioning.cs
- TemplateBindingExtensionConverter.cs
- SelectionPattern.cs
- WebResourceAttribute.cs
- HttpWebResponse.cs
- CurrentChangingEventManager.cs
- ProfileProvider.cs
- Predicate.cs
- SemanticResultValue.cs
- EventLogPermissionEntryCollection.cs
- XmlSerializationReader.cs
- VirtualizedContainerService.cs
- RemoteX509Token.cs
- BufferedGraphicsManager.cs
- ITextView.cs
- MarginsConverter.cs
- SqlTrackingWorkflowInstance.cs
- StringReader.cs
- NameTable.cs
- Delegate.cs
- GeneralTransformGroup.cs
- RewritingPass.cs
- PassportAuthenticationEventArgs.cs
- DataGridTextBox.cs
- TextTreeFixupNode.cs
- CreateUserWizard.cs
- BuildResultCache.cs
- MatrixIndependentAnimationStorage.cs
- Image.cs
- TreeNodeStyle.cs
- FontStyles.cs
- EmissiveMaterial.cs
- ScriptControlManager.cs
- UInt32Converter.cs
- ReverseInheritProperty.cs
- AutomationPropertyInfo.cs