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
- DataGridHeaderBorder.cs
- ZoneIdentityPermission.cs
- InstanceDataCollectionCollection.cs
- Point4D.cs
- HtmlDocument.cs
- StaticSiteMapProvider.cs
- _RequestCacheProtocol.cs
- RoutedCommand.cs
- DataSourceProvider.cs
- TypeBuilderInstantiation.cs
- TextSearch.cs
- TextComposition.cs
- ComContractElement.cs
- InvalidWMPVersionException.cs
- HyperLinkStyle.cs
- MobileSysDescriptionAttribute.cs
- IntSecurity.cs
- State.cs
- RoleBoolean.cs
- AmbiguousMatchException.cs
- QEncodedStream.cs
- Rfc2898DeriveBytes.cs
- WebHttpSecurity.cs
- ContentType.cs
- HttpCapabilitiesSectionHandler.cs
- WorkflowControlClient.cs
- DefaultEvaluationContext.cs
- SynchronizedDispatch.cs
- shaperfactoryquerycachekey.cs
- DataReaderContainer.cs
- httpapplicationstate.cs
- WebEvents.cs
- DesignerSerializationOptionsAttribute.cs
- CannotUnloadAppDomainException.cs
- GridViewCellAutomationPeer.cs
- DbDeleteCommandTree.cs
- DataKey.cs
- XhtmlTextWriter.cs
- CellTreeNodeVisitors.cs
- CompoundFileIOPermission.cs
- StylusEditingBehavior.cs
- WorkItem.cs
- OverflowException.cs
- CompressEmulationStream.cs
- XmlSchemaAnnotated.cs
- SqlGenerator.cs
- ClientSideQueueItem.cs
- XmlComment.cs
- ComplexTypeEmitter.cs
- EventSinkHelperWriter.cs
- SqlFactory.cs
- ParsedAttributeCollection.cs
- EntityContainerRelationshipSet.cs
- Monitor.cs
- ParsedAttributeCollection.cs
- CompiledAction.cs
- ComponentGuaranteesAttribute.cs
- SchemaElementLookUpTable.cs
- RectIndependentAnimationStorage.cs
- EnumerableRowCollection.cs
- VirtualDirectoryMappingCollection.cs
- Win32MouseDevice.cs
- Shape.cs
- ClientTarget.cs
- ChildrenQuery.cs
- BrowserTree.cs
- WebPartUserCapability.cs
- NullableDecimalSumAggregationOperator.cs
- MobilePage.cs
- HotSpot.cs
- QilCloneVisitor.cs
- QilTargetType.cs
- HttpCookiesSection.cs
- WindowClosedEventArgs.cs
- X509PeerCertificateElement.cs
- Calendar.cs
- LayoutEvent.cs
- GeneralTransformGroup.cs
- XmlSchemaAttributeGroup.cs
- DataServicePagingProviderWrapper.cs
- StylusButtonEventArgs.cs
- ProcessHost.cs
- PathSegment.cs
- StorageScalarPropertyMapping.cs
- PrinterResolution.cs
- ItemsPresenter.cs
- CodeDirectiveCollection.cs
- DateTimeConverter2.cs
- ManifestResourceInfo.cs
- Compensation.cs
- SessionPageStateSection.cs
- XmlnsPrefixAttribute.cs
- ConfigXmlText.cs
- TableParagraph.cs
- BevelBitmapEffect.cs
- HttpsTransportBindingElement.cs
- ResourceDisplayNameAttribute.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- TableParaClient.cs
- PasswordRecovery.cs