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
- RijndaelManagedTransform.cs
- DESCryptoServiceProvider.cs
- XmlDataDocument.cs
- COSERVERINFO.cs
- IPAddress.cs
- HyperlinkAutomationPeer.cs
- AssemblyContextControlItem.cs
- DbModificationCommandTree.cs
- ImageSourceTypeConverter.cs
- CacheMemory.cs
- ListViewTableRow.cs
- TabletCollection.cs
- CompilerLocalReference.cs
- UnsafeNativeMethods.cs
- EncryptedData.cs
- TrackingMemoryStreamFactory.cs
- FontFamily.cs
- PageResolution.cs
- KeyPressEvent.cs
- TheQuery.cs
- FusionWrap.cs
- LinkLabelLinkClickedEvent.cs
- AssemblyResolver.cs
- SByteConverter.cs
- IndependentlyAnimatedPropertyMetadata.cs
- CorePropertiesFilter.cs
- HuffmanTree.cs
- OdbcError.cs
- XslCompiledTransform.cs
- RequestQueue.cs
- ContractReference.cs
- Normalization.cs
- Win32Native.cs
- Border.cs
- TraceContextRecord.cs
- DataPagerCommandEventArgs.cs
- AccessKeyManager.cs
- ButtonPopupAdapter.cs
- CustomSignedXml.cs
- Deflater.cs
- ApplicationTrust.cs
- ExpressionPrinter.cs
- BinHexEncoding.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- BamlTreeUpdater.cs
- PropertyEmitterBase.cs
- XmlSchemaAttributeGroup.cs
- ContainerUtilities.cs
- SignatureDescription.cs
- ClientApiGenerator.cs
- TraceInternal.cs
- Control.cs
- SimpleHandlerFactory.cs
- Panel.cs
- sqlcontext.cs
- CompoundFileStorageReference.cs
- PostBackOptions.cs
- SwitchElementsCollection.cs
- IdentityHolder.cs
- GenerateHelper.cs
- DbParameterHelper.cs
- ConfigsHelper.cs
- ProviderException.cs
- Native.cs
- HashAlgorithm.cs
- DataControlField.cs
- DocumentPageTextView.cs
- GridViewRow.cs
- DataRowView.cs
- StreamAsIStream.cs
- OutOfMemoryException.cs
- QfeChecker.cs
- XmlSchemaComplexType.cs
- OraclePermissionAttribute.cs
- TextTreeInsertUndoUnit.cs
- DiscoveryServiceExtension.cs
- DocumentReferenceCollection.cs
- SyndicationSerializer.cs
- MaskPropertyEditor.cs
- SecurityElement.cs
- SqlCacheDependencyDatabase.cs
- DataControlImageButton.cs
- UnsafeNativeMethods.cs
- MarkupExtensionParser.cs
- DirectoryInfo.cs
- CodeStatement.cs
- PermissionToken.cs
- InputLanguageCollection.cs
- Run.cs
- CachedCompositeFamily.cs
- MouseBinding.cs
- UInt32.cs
- QuaternionRotation3D.cs
- MappingSource.cs
- Timer.cs
- XmlStreamStore.cs
- FixedSOMImage.cs
- Pts.cs
- FormattedTextSymbols.cs
- FocusChangedEventArgs.cs