Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / XPath / Internal / CacheAxisQuery.cs / 1305376 / CacheAxisQuery.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.Collections.Generic; internal abstract class CacheAxisQuery : BaseAxisQuery { // int count; -- we reusing it here protected ListoutputBuffer; public CacheAxisQuery(Query qyInput, string name, string prefix, XPathNodeType typeTest) : base(qyInput, name, prefix, typeTest) { this.outputBuffer = new List (); this.count = 0; } protected CacheAxisQuery(CacheAxisQuery other) : base(other) { this.outputBuffer = new List (other.outputBuffer); this.count = other.count; } public override void Reset() { this.count = 0; } public override object Evaluate(XPathNodeIterator context) { base.Evaluate(context); outputBuffer.Clear(); return this; } public override XPathNavigator Advance() { Debug.Assert(0 <= count && count <= outputBuffer.Count); if (count < outputBuffer.Count) { return outputBuffer[count++]; } return null; } public override XPathNavigator Current { get { Debug.Assert(0 <= count && count <= outputBuffer.Count); if (count == 0) { return null; } return outputBuffer[count - 1]; } } public override int CurrentPosition { get { return count; } } public override int Count { get { return outputBuffer.Count; } } public override QueryProps Properties { get { return QueryProps.Merge | QueryProps.Cached | QueryProps.Position | QueryProps.Count; } } } } // 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
- CommonObjectSecurity.cs
- ByteKeyFrameCollection.cs
- Aes.cs
- SpellerInterop.cs
- CodeArgumentReferenceExpression.cs
- SQLBytesStorage.cs
- ToolStripItemTextRenderEventArgs.cs
- FormViewModeEventArgs.cs
- SocketAddress.cs
- XmlEncoding.cs
- PbrsForward.cs
- BooleanFacetDescriptionElement.cs
- HtmlInputCheckBox.cs
- ToolStripDropDownClosingEventArgs.cs
- CustomError.cs
- PropertyTabChangedEvent.cs
- ClosureBinding.cs
- mediaeventargs.cs
- Literal.cs
- DoubleAnimationUsingPath.cs
- XsltFunctions.cs
- SizeF.cs
- NTAccount.cs
- HttpBindingExtension.cs
- COM2FontConverter.cs
- ExtendedProtectionPolicy.cs
- RNGCryptoServiceProvider.cs
- MailAddress.cs
- ListControl.cs
- CommentEmitter.cs
- HttpApplicationStateBase.cs
- StyleCollection.cs
- DefaultBinder.cs
- CustomError.cs
- XmlName.cs
- ChooseAction.cs
- ValueUnavailableException.cs
- Certificate.cs
- UnaryNode.cs
- SAPICategories.cs
- RIPEMD160Managed.cs
- ElapsedEventArgs.cs
- AtomMaterializer.cs
- ObjectToIdCache.cs
- NavigatingCancelEventArgs.cs
- DataTemplate.cs
- Label.cs
- RuntimeHelpers.cs
- KeyNotFoundException.cs
- GroupBox.cs
- Oid.cs
- BindingContext.cs
- VSWCFServiceContractGenerator.cs
- InputLanguageProfileNotifySink.cs
- DeclaredTypeElement.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- DeviceSpecificDialogCachedState.cs
- ViewPort3D.cs
- SchemaHelper.cs
- TypefaceCollection.cs
- SR.cs
- LoginUtil.cs
- ServiceModelActivity.cs
- ScrollPattern.cs
- EventLogTraceListener.cs
- SecurityTokenAuthenticator.cs
- EncoderNLS.cs
- RecordConverter.cs
- DataSourceView.cs
- SQLSingleStorage.cs
- BrowserInteropHelper.cs
- CompensatableTransactionScopeActivity.cs
- PowerModeChangedEventArgs.cs
- ManagementObjectSearcher.cs
- CreateUserErrorEventArgs.cs
- TracingConnection.cs
- FileAuthorizationModule.cs
- IDictionary.cs
- ThrowHelper.cs
- CorrelationService.cs
- DrawingCollection.cs
- RealizedColumnsBlock.cs
- Container.cs
- ChannelManager.cs
- UmAlQuraCalendar.cs
- EventlogProvider.cs
- EventLogPermissionEntryCollection.cs
- ASCIIEncoding.cs
- UIntPtr.cs
- StrokeFIndices.cs
- SemanticValue.cs
- HttpStreamXmlDictionaryWriter.cs
- EventProvider.cs
- ResourceReader.cs
- X509ChainPolicy.cs
- ValidationError.cs
- CanonicalXml.cs
- PasswordRecoveryAutoFormat.cs
- ZipIOExtraField.cs
- TreeNodeEventArgs.cs