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
- CodeAccessPermission.cs
- BitmapEffectCollection.cs
- SequenceDesigner.xaml.cs
- PublisherMembershipCondition.cs
- ReadContentAsBinaryHelper.cs
- TimeoutException.cs
- HybridDictionary.cs
- ImageBrush.cs
- AsymmetricAlgorithm.cs
- __TransparentProxy.cs
- SHA1Managed.cs
- configsystem.cs
- TemplateInstanceAttribute.cs
- QueryParameter.cs
- basevalidator.cs
- CursorConverter.cs
- MimeMultiPart.cs
- PersonalizationStateInfo.cs
- WebPartChrome.cs
- HierarchicalDataTemplate.cs
- VolatileEnlistmentState.cs
- MethodImplAttribute.cs
- DbProviderManifest.cs
- HandledEventArgs.cs
- CharConverter.cs
- AmbientLight.cs
- CodeDirectoryCompiler.cs
- ValueProviderWrapper.cs
- ProfileGroupSettingsCollection.cs
- httpapplicationstate.cs
- TreeNodeBindingCollection.cs
- ParseElementCollection.cs
- CacheOutputQuery.cs
- TypedTableBase.cs
- SafeSerializationManager.cs
- CheckPair.cs
- SqlGenerator.cs
- AdvancedBindingPropertyDescriptor.cs
- CollectionContainer.cs
- MarkupObject.cs
- RequestedSignatureDialog.cs
- Pipe.cs
- TextMarkerSource.cs
- BindingExpressionBase.cs
- SelectionHighlightInfo.cs
- FontDifferentiator.cs
- ComplexLine.cs
- SelectQueryOperator.cs
- GenericEnumerator.cs
- DesignerCalendarAdapter.cs
- XmlMtomReader.cs
- BCryptHashAlgorithm.cs
- MasterPage.cs
- TableLayoutColumnStyleCollection.cs
- PeerEndPoint.cs
- ClaimComparer.cs
- CodeSubDirectoriesCollection.cs
- SQLDecimalStorage.cs
- XmlAnyElementAttributes.cs
- MultiSelector.cs
- RegexWorker.cs
- TextParagraphView.cs
- CallbackCorrelationInitializer.cs
- DecoderFallbackWithFailureFlag.cs
- ListBox.cs
- NativeMethods.cs
- DataGridCell.cs
- SetStoryboardSpeedRatio.cs
- UserNamePasswordServiceCredential.cs
- HtmlTable.cs
- ConsumerConnectionPoint.cs
- LocatorBase.cs
- ToolTipAutomationPeer.cs
- StylusTip.cs
- CodePageUtils.cs
- AuthorizationRuleCollection.cs
- InstanceStore.cs
- Context.cs
- BindableAttribute.cs
- XmlEntityReference.cs
- VisualTreeHelper.cs
- EllipseGeometry.cs
- DataExpression.cs
- RsaSecurityTokenAuthenticator.cs
- EntityClassGenerator.cs
- QilLiteral.cs
- NetWebProxyFinder.cs
- DependencyObjectProvider.cs
- NavigationPropertyEmitter.cs
- SatelliteContractVersionAttribute.cs
- MultiPageTextView.cs
- CssClassPropertyAttribute.cs
- TextSerializer.cs
- SchemaImporter.cs
- FrameworkElement.cs
- ServiceEndpointElementCollection.cs
- PropertyMetadata.cs
- CodeTypeReference.cs
- WebHttpBinding.cs
- followingquery.cs