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
- AccessDataSourceDesigner.cs
- CodeAccessPermission.cs
- SafeNativeMethodsMilCoreApi.cs
- WebPartAddingEventArgs.cs
- BinaryMessageEncodingElement.cs
- FilterQuery.cs
- BitmapPalette.cs
- WebAdminConfigurationHelper.cs
- HttpContext.cs
- SyndicationSerializer.cs
- DataGridViewRowPrePaintEventArgs.cs
- CharUnicodeInfo.cs
- XsltOutput.cs
- QilScopedVisitor.cs
- ResourceManagerWrapper.cs
- BinaryNegotiation.cs
- MissingSatelliteAssemblyException.cs
- TransactionScope.cs
- MaxMessageSizeStream.cs
- Stroke2.cs
- IFlowDocumentViewer.cs
- OracleNumber.cs
- Light.cs
- PathFigureCollection.cs
- ReadOnlyHierarchicalDataSource.cs
- ActivityXRefPropertyEditor.cs
- Serializer.cs
- ProcessThread.cs
- Comparer.cs
- SequentialActivityDesigner.cs
- RSAPKCS1KeyExchangeFormatter.cs
- Validator.cs
- ProfileGroupSettingsCollection.cs
- PrePrepareMethodAttribute.cs
- DispatchWrapper.cs
- TreeNodeStyleCollection.cs
- PseudoWebRequest.cs
- FixedElement.cs
- WebPartMinimizeVerb.cs
- Double.cs
- ObjectConverter.cs
- RadioButtonFlatAdapter.cs
- MailBnfHelper.cs
- SQLDateTimeStorage.cs
- XmlArrayItemAttributes.cs
- SecurityUtils.cs
- sortedlist.cs
- SqlAliasesReferenced.cs
- EndpointAddressAugust2004.cs
- CounterSample.cs
- LinqExpressionNormalizer.cs
- InputScope.cs
- XmlNotation.cs
- StringDictionary.cs
- ListViewDeletedEventArgs.cs
- CodeAttributeDeclaration.cs
- WindowsAuthenticationModule.cs
- ContentFilePart.cs
- WebMessageEncoderFactory.cs
- MessageBox.cs
- TableStyle.cs
- EntityDesignerUtils.cs
- EventListenerClientSide.cs
- ExpressionConverter.cs
- StringFreezingAttribute.cs
- SystemDiagnosticsSection.cs
- TextRangeSerialization.cs
- ReferenceEqualityComparer.cs
- CriticalFinalizerObject.cs
- MouseEventArgs.cs
- AttributeUsageAttribute.cs
- XmlDataSource.cs
- DynamicMethod.cs
- NotifyInputEventArgs.cs
- TransportOutputChannel.cs
- UIElementIsland.cs
- PictureBoxDesigner.cs
- UrlMapping.cs
- ComboBoxItem.cs
- ResXResourceReader.cs
- WebPartsPersonalizationAuthorization.cs
- PointLight.cs
- Hash.cs
- streamingZipPartStream.cs
- DataGridViewAccessibleObject.cs
- FacetValues.cs
- SystemTcpStatistics.cs
- WindowsContainer.cs
- VarInfo.cs
- DbConnectionPoolGroup.cs
- TypeDelegator.cs
- EntityDataSourceContainerNameConverter.cs
- WmlMobileTextWriter.cs
- RawStylusActions.cs
- Queue.cs
- PropertyMapper.cs
- ErrorTableItemStyle.cs
- UIServiceHelper.cs
- TraceShell.cs
- XPathNavigator.cs