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
- ToolStripHighContrastRenderer.cs
- AstNode.cs
- ServiceModelInstallComponent.cs
- ThemeableAttribute.cs
- DependencyObjectPropertyDescriptor.cs
- ToolboxBitmapAttribute.cs
- storepermission.cs
- ProcessModuleDesigner.cs
- CriticalExceptions.cs
- Transform3D.cs
- FrameworkElement.cs
- IisTraceWebEventProvider.cs
- HtmlInputControl.cs
- CookieProtection.cs
- WriterOutput.cs
- SqlPersonalizationProvider.cs
- XmlSchemaImport.cs
- Serializer.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- ApplicationSettingsBase.cs
- EndEvent.cs
- glyphs.cs
- SelectionPattern.cs
- CollectionView.cs
- unitconverter.cs
- Activity.cs
- AttributeUsageAttribute.cs
- DataGridViewCellCollection.cs
- CommandTreeTypeHelper.cs
- DataGridViewBand.cs
- Substitution.cs
- MSG.cs
- NativeCppClassAttribute.cs
- PrintPreviewDialog.cs
- IndexingContentUnit.cs
- ColumnHeaderConverter.cs
- AssociationTypeEmitter.cs
- TableRowCollection.cs
- ServiceDescriptionSerializer.cs
- WindowsScroll.cs
- SrgsElementFactoryCompiler.cs
- Transform.cs
- ConfigPathUtility.cs
- RepeaterItemEventArgs.cs
- XmlTextEncoder.cs
- HttpListenerPrefixCollection.cs
- HttpServerVarsCollection.cs
- TextSchema.cs
- XPathPatternBuilder.cs
- DataGridViewMethods.cs
- TabControlEvent.cs
- ResponseStream.cs
- MemberMaps.cs
- TogglePattern.cs
- DefaultValueAttribute.cs
- OrderByQueryOptionExpression.cs
- Image.cs
- PolyLineSegmentFigureLogic.cs
- RecognizerInfo.cs
- Icon.cs
- MasterPageParser.cs
- LinqDataSourceStatusEventArgs.cs
- VisualProxy.cs
- Cursor.cs
- ZeroOpNode.cs
- DesignTimeData.cs
- RuleSetCollection.cs
- FixedSOMTableRow.cs
- MaskedTextBoxTextEditorDropDown.cs
- TouchFrameEventArgs.cs
- dataprotectionpermissionattribute.cs
- LayoutSettings.cs
- UnicodeEncoding.cs
- MachineKeySection.cs
- WrappingXamlSchemaContext.cs
- PtsPage.cs
- ServiceReference.cs
- WaitForChangedResult.cs
- ResourceDefaultValueAttribute.cs
- FusionWrap.cs
- SettingsSection.cs
- OutputCacheModule.cs
- Schema.cs
- ConfigurationElementProperty.cs
- DeviceContext.cs
- FlowDocumentReaderAutomationPeer.cs
- Error.cs
- WindowsSlider.cs
- WebPartDeleteVerb.cs
- Composition.cs
- SQLInt64.cs
- GenericPrincipal.cs
- GridViewCommandEventArgs.cs
- Oid.cs
- ProxyHelper.cs
- XPathSelfQuery.cs
- StylusButtonCollection.cs
- XmlIgnoreAttribute.cs
- XmlExpressionDumper.cs
- CodeTypeReferenceCollection.cs