Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Xml / System / Xml / XPath / Internal / CacheAxisQuery.cs / 1 / 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. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CompositeScriptReferenceEventArgs.cs
- WebRequest.cs
- SweepDirectionValidation.cs
- CommandEventArgs.cs
- GeometryGroup.cs
- PointAnimationUsingKeyFrames.cs
- MemberPath.cs
- DragDrop.cs
- AssemblyBuilder.cs
- ToolTipService.cs
- XmlNullResolver.cs
- SignHashRequest.cs
- RuleSet.cs
- FlowDocumentPageViewerAutomationPeer.cs
- SQLDecimal.cs
- LinkUtilities.cs
- ZipIOModeEnforcingStream.cs
- SynchronizedChannelCollection.cs
- VisualTreeUtils.cs
- DoubleLink.cs
- serverconfig.cs
- WebPartEventArgs.cs
- CapabilitiesPattern.cs
- HtmlShimManager.cs
- OleStrCAMarshaler.cs
- sqlser.cs
- ModuleConfigurationInfo.cs
- Section.cs
- XmlDigitalSignatureProcessor.cs
- FormViewDeletedEventArgs.cs
- SpeechUI.cs
- XamlStream.cs
- StreamUpdate.cs
- CustomErrorCollection.cs
- SrgsRulesCollection.cs
- TiffBitmapEncoder.cs
- Int64AnimationBase.cs
- Transactions.cs
- ModulesEntry.cs
- HandleRef.cs
- ToolStripContentPanel.cs
- ADMembershipUser.cs
- util.cs
- CheckBoxField.cs
- LeaseManager.cs
- DetailsViewCommandEventArgs.cs
- IisTraceWebEventProvider.cs
- MessageFault.cs
- FlowDocumentScrollViewer.cs
- CompoundFileStreamReference.cs
- RelationshipEndCollection.cs
- PropertyTab.cs
- ImageFormat.cs
- UnaryNode.cs
- SvcMapFile.cs
- COM2ICategorizePropertiesHandler.cs
- DesignerActionKeyboardBehavior.cs
- DesignerAutoFormat.cs
- XmlSerializerVersionAttribute.cs
- ExtensionWindow.cs
- ClientTarget.cs
- Set.cs
- ReadOnlyDictionary.cs
- IDictionary.cs
- Vector3DAnimationUsingKeyFrames.cs
- SessionEndedEventArgs.cs
- ArraySortHelper.cs
- SqlDataSourceQueryConverter.cs
- ApplicationFileCodeDomTreeGenerator.cs
- TextBoxBase.cs
- CounterSetInstance.cs
- _CommandStream.cs
- RSAOAEPKeyExchangeDeformatter.cs
- DataExpression.cs
- GroupQuery.cs
- RegexCompilationInfo.cs
- MarkupCompiler.cs
- HtmlTableCell.cs
- WsatConfiguration.cs
- PackWebResponse.cs
- ListViewCancelEventArgs.cs
- XPathDocumentNavigator.cs
- XD.cs
- SpeakProgressEventArgs.cs
- EntityWrapper.cs
- StringCollection.cs
- EdmFunctionAttribute.cs
- DataControlCommands.cs
- SkipStoryboardToFill.cs
- SystemKeyConverter.cs
- ColumnWidthChangedEvent.cs
- WeakReference.cs
- VScrollProperties.cs
- SslStream.cs
- ADMembershipUser.cs
- Point3DAnimationBase.cs
- DictionaryEditChange.cs
- ResourceDisplayNameAttribute.cs
- SplashScreenNativeMethods.cs
- AutoGeneratedFieldProperties.cs