Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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
- Panel.cs
- MemberInfoSerializationHolder.cs
- DefaultTextStoreTextComposition.cs
- CatalogPartCollection.cs
- XsdBuildProvider.cs
- ByteStreamMessageUtility.cs
- ObjectKeyFrameCollection.cs
- TextServicesCompartmentEventSink.cs
- EventTask.cs
- DataTablePropertyDescriptor.cs
- OdbcStatementHandle.cs
- WebServiceEnumData.cs
- ConstraintManager.cs
- TableSectionStyle.cs
- ErrorFormatterPage.cs
- DiscriminatorMap.cs
- MetafileHeaderWmf.cs
- ProgressPage.cs
- TextSpanModifier.cs
- GridSplitterAutomationPeer.cs
- DataGridViewControlCollection.cs
- ExtenderProvidedPropertyAttribute.cs
- VScrollProperties.cs
- CellTreeNode.cs
- UniformGrid.cs
- SystemColors.cs
- OperationFormatter.cs
- Int32CAMarshaler.cs
- DataRow.cs
- SqlFactory.cs
- HttpWriter.cs
- SystemIPInterfaceProperties.cs
- TextTrailingCharacterEllipsis.cs
- TabPageDesigner.cs
- RuntimeArgumentHandle.cs
- HttpServerVarsCollection.cs
- ClientScriptManagerWrapper.cs
- DaylightTime.cs
- webbrowsersite.cs
- HtmlInputText.cs
- NamespaceInfo.cs
- SafeEventLogWriteHandle.cs
- SqlBulkCopyColumnMappingCollection.cs
- DataControlButton.cs
- SqlCachedBuffer.cs
- DocumentPageTextView.cs
- XhtmlMobileTextWriter.cs
- RawStylusSystemGestureInputReport.cs
- MimeWriter.cs
- ExpandSegmentCollection.cs
- XmlValidatingReaderImpl.cs
- HandlerBase.cs
- _BaseOverlappedAsyncResult.cs
- PropertyPath.cs
- FacetValueContainer.cs
- JsonClassDataContract.cs
- ListenerSessionConnection.cs
- BrowserInteropHelper.cs
- DrawingAttributeSerializer.cs
- TextPatternIdentifiers.cs
- GridViewHeaderRowPresenter.cs
- LineGeometry.cs
- SqlMethodCallConverter.cs
- DetailsViewInsertEventArgs.cs
- SmtpReplyReader.cs
- control.ime.cs
- XmlUrlResolver.cs
- QueryStatement.cs
- EntityRecordInfo.cs
- InvalidDataException.cs
- LostFocusEventManager.cs
- NavigationPropertyEmitter.cs
- ContainerParagraph.cs
- ChannelServices.cs
- DetailsViewRow.cs
- StrokeNodeEnumerator.cs
- DataGridItem.cs
- BitmapPalette.cs
- WebPartCollection.cs
- FixedSchema.cs
- HttpProcessUtility.cs
- ExceptionValidationRule.cs
- DropShadowEffect.cs
- SourceItem.cs
- Point3DConverter.cs
- WebPartPersonalization.cs
- XmlNamespaceMappingCollection.cs
- Action.cs
- UIElement3D.cs
- EndpointBehaviorElement.cs
- WrappedIUnknown.cs
- UnsafeNativeMethods.cs
- LogicalTreeHelper.cs
- SweepDirectionValidation.cs
- NetworkAddressChange.cs
- ReceiveContextCollection.cs
- RepeaterItem.cs
- View.cs
- SendSecurityHeaderElementContainer.cs
- _Semaphore.cs