Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / XPath / Internal / XPathSelectionIterator.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- _SSPISessionCache.cs
- QilPatternVisitor.cs
- WebServiceHandler.cs
- DocumentPageView.cs
- ScrollableControl.cs
- SqlUdtInfo.cs
- CodeObject.cs
- DateTimeOffset.cs
- BaseInfoTable.cs
- SystemIPv4InterfaceProperties.cs
- _UriTypeConverter.cs
- AppDomainGrammarProxy.cs
- DoWhileDesigner.xaml.cs
- PopOutPanel.cs
- EventHandlers.cs
- DiscoveryDocumentReference.cs
- ClrPerspective.cs
- OdbcTransaction.cs
- WinInetCache.cs
- RecordsAffectedEventArgs.cs
- Schema.cs
- Cursor.cs
- UnescapedXmlDiagnosticData.cs
- PolicyLevel.cs
- ClientConfigPaths.cs
- DPCustomTypeDescriptor.cs
- ReflectionServiceProvider.cs
- EpmContentDeSerializerBase.cs
- PackWebRequestFactory.cs
- MonthChangedEventArgs.cs
- SecurityDescriptor.cs
- PageCatalogPart.cs
- BooleanSwitch.cs
- ActivityScheduledQuery.cs
- KerberosRequestorSecurityToken.cs
- MediaTimeline.cs
- SoapIncludeAttribute.cs
- AssemblyCollection.cs
- Documentation.cs
- COM2ComponentEditor.cs
- DataKey.cs
- Vector3DCollectionConverter.cs
- InputLangChangeEvent.cs
- EndOfStreamException.cs
- XmlNamespaceDeclarationsAttribute.cs
- EditModeSwitchButton.cs
- DBBindings.cs
- XmlQualifiedName.cs
- DESCryptoServiceProvider.cs
- QilLiteral.cs
- PostBackOptions.cs
- DefaultWorkflowTransactionService.cs
- BinaryConverter.cs
- SeekableReadStream.cs
- ObjectHelper.cs
- CheckableControlBaseAdapter.cs
- IsolatedStorageFile.cs
- NaturalLanguageHyphenator.cs
- MarkerProperties.cs
- TreeNode.cs
- BitArray.cs
- NetSectionGroup.cs
- OdbcConnection.cs
- FixedPageAutomationPeer.cs
- ErrorRuntimeConfig.cs
- XmlSchema.cs
- ObjectItemNoOpAssemblyLoader.cs
- InfoCard.cs
- CodeDirectionExpression.cs
- PropertyMetadata.cs
- PKCS1MaskGenerationMethod.cs
- CompilerState.cs
- CustomTrackingRecord.cs
- VectorAnimationBase.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- HttpTransportElement.cs
- OverrideMode.cs
- QueryCoreOp.cs
- ScrollProperties.cs
- LineProperties.cs
- GridViewUpdatedEventArgs.cs
- ThemeInfoAttribute.cs
- TrackingMemoryStream.cs
- CompleteWizardStep.cs
- CursorConverter.cs
- InputReport.cs
- ToolStrip.cs
- DeobfuscatingStream.cs
- CodeStatement.cs
- ProjectionRewriter.cs
- MutexSecurity.cs
- AnnotationMap.cs
- MDIWindowDialog.cs
- TimersDescriptionAttribute.cs
- ValidationRule.cs
- WorkerRequest.cs
- DataColumnPropertyDescriptor.cs
- AxisAngleRotation3D.cs
- CorrelationTokenInvalidatedHandler.cs
- EventMappingSettings.cs