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
- ToggleProviderWrapper.cs
- HtmlInputReset.cs
- KnownBoxes.cs
- GlobalItem.cs
- ConnectionManager.cs
- CodeCatchClauseCollection.cs
- TextEndOfParagraph.cs
- ChangeProcessor.cs
- CheckableControlBaseAdapter.cs
- XmlSchemaImport.cs
- SiteMapNodeItemEventArgs.cs
- OleDbException.cs
- WmlPageAdapter.cs
- TransactionChannel.cs
- WindowCollection.cs
- SessionPageStateSection.cs
- PriorityBindingExpression.cs
- SqlDataSourceView.cs
- LoginDesignerUtil.cs
- LineVisual.cs
- SqlUDTStorage.cs
- WsdlInspector.cs
- Constants.cs
- ScrollViewer.cs
- TypeUtil.cs
- PriorityBinding.cs
- DbSourceParameterCollection.cs
- KeySpline.cs
- ExpressionBindingCollection.cs
- PermissionAttributes.cs
- EntityProxyFactory.cs
- MouseGestureValueSerializer.cs
- KeyValueConfigurationElement.cs
- X509Certificate2Collection.cs
- CodeConstructor.cs
- XmlMembersMapping.cs
- IRCollection.cs
- DataServiceResponse.cs
- DockProviderWrapper.cs
- RecordBuilder.cs
- SoapIgnoreAttribute.cs
- LayoutExceptionEventArgs.cs
- Triplet.cs
- Model3DCollection.cs
- Adorner.cs
- QueryOutputWriterV1.cs
- HelloMessage11.cs
- XPathAncestorQuery.cs
- SQLConvert.cs
- WasAdminWrapper.cs
- SafeRightsManagementEnvironmentHandle.cs
- EntityObject.cs
- PermissionListSet.cs
- WebSysDisplayNameAttribute.cs
- TextTreeRootNode.cs
- ExtensionCollection.cs
- ImageAutomationPeer.cs
- DynamicValueConverter.cs
- RemoteDebugger.cs
- Queue.cs
- TextServicesManager.cs
- DataGridViewImageColumn.cs
- XmlSchemaInfo.cs
- EntityDataSourceSelectingEventArgs.cs
- CodeSnippetStatement.cs
- DataGridViewLayoutData.cs
- CornerRadiusConverter.cs
- HandoffBehavior.cs
- XmlNamespaceManager.cs
- ComponentResourceManager.cs
- UnsafeNativeMethods.cs
- SessionState.cs
- ImagingCache.cs
- BaseEntityWrapper.cs
- DesignTimeHTMLTextWriter.cs
- ColumnMap.cs
- Package.cs
- XmlNamespaceManager.cs
- ScrollChangedEventArgs.cs
- SqlBuffer.cs
- MappingException.cs
- BitmapEffectInputData.cs
- BidOverLoads.cs
- DesignerActionUI.cs
- ManipulationDelta.cs
- HttpStreamMessage.cs
- WorkflowPrinting.cs
- NameValueConfigurationCollection.cs
- XmlCharacterData.cs
- FixedSOMImage.cs
- RichTextBoxAutomationPeer.cs
- ZipPackagePart.cs
- ItemCheckedEvent.cs
- TreeViewBindingsEditorForm.cs
- MultiPageTextView.cs
- IdentitySection.cs
- Math.cs
- SqlBooleanizer.cs
- SqlXml.cs
- PropertyTabAttribute.cs