Code:
/ FX-1434 / FX-1434 / 1.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
- TrackingExtract.cs
- CellCreator.cs
- propertyentry.cs
- TimerElapsedEvenArgs.cs
- DataGridCaption.cs
- FusionWrap.cs
- Matrix.cs
- ProfilePropertySettingsCollection.cs
- DesignerSerializationOptionsAttribute.cs
- BindingBase.cs
- ProgressBarAutomationPeer.cs
- DiscreteKeyFrames.cs
- ConnectionStringEditor.cs
- ActionMismatchAddressingException.cs
- SymbolType.cs
- CollaborationHelperFunctions.cs
- ScrollViewerAutomationPeer.cs
- DataBoundControlAdapter.cs
- ObjectDataProvider.cs
- HtmlControlAdapter.cs
- RepeatBehaviorConverter.cs
- ADMembershipUser.cs
- FocusWithinProperty.cs
- LicFileLicenseProvider.cs
- UrlMappingsModule.cs
- ButtonPopupAdapter.cs
- SelectionEditor.cs
- SiteMapSection.cs
- EdmFunction.cs
- BitStream.cs
- Vector3DConverter.cs
- ConsoleEntryPoint.cs
- DeploymentSectionCache.cs
- SecurityUtils.cs
- WebResponse.cs
- HandleExceptionArgs.cs
- PropertyConverter.cs
- SafeTimerHandle.cs
- SqlNodeTypeOperators.cs
- EncryptedType.cs
- TextServicesCompartment.cs
- PixelFormatConverter.cs
- NeutralResourcesLanguageAttribute.cs
- CodeAttributeArgument.cs
- SpeakInfo.cs
- ScrollContentPresenter.cs
- UpdateCommand.cs
- _NativeSSPI.cs
- Border.cs
- CurrentChangedEventManager.cs
- FileIOPermission.cs
- CssStyleCollection.cs
- ClosableStream.cs
- WorkflowExecutor.cs
- WeakReference.cs
- AnimationClockResource.cs
- XmlSchemaParticle.cs
- EntitySetRetriever.cs
- Application.cs
- AttachedAnnotation.cs
- ScriptReferenceBase.cs
- ApplicationDirectory.cs
- OdbcStatementHandle.cs
- ParameterBuilder.cs
- ApplicationException.cs
- Context.cs
- IndexedEnumerable.cs
- TextTreePropertyUndoUnit.cs
- SqlConnectionFactory.cs
- SynchronizationFilter.cs
- StatusBar.cs
- Attributes.cs
- TypeProvider.cs
- ConcurrentBag.cs
- PageRequestManager.cs
- loginstatus.cs
- PropertyValueUIItem.cs
- EventLogConfiguration.cs
- OleDbDataAdapter.cs
- ForeignKeyFactory.cs
- TextServicesDisplayAttribute.cs
- DiagnosticsConfiguration.cs
- MouseEvent.cs
- Knowncolors.cs
- TreeNode.cs
- PropertyReferenceExtension.cs
- CommentEmitter.cs
- BaseTemplateParser.cs
- StringConcat.cs
- DeferredReference.cs
- DataGridHeaderBorder.cs
- Transform3DCollection.cs
- WebZone.cs
- AdPostCacheSubstitution.cs
- Geometry.cs
- BasePropertyDescriptor.cs
- SchemaElementLookUpTable.cs
- RegexParser.cs
- OutputChannel.cs
- MissingFieldException.cs