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
- DesignerCalendarAdapter.cs
- Point3DCollection.cs
- DesignSurfaceManager.cs
- ZoneMembershipCondition.cs
- XmlSchemaObjectTable.cs
- TextElementEnumerator.cs
- DataServiceStreamProviderWrapper.cs
- PtsContext.cs
- KeyedHashAlgorithm.cs
- DownloadProgressEventArgs.cs
- InputManager.cs
- DbgUtil.cs
- WebPartUtil.cs
- SpinLock.cs
- EmptyTextWriter.cs
- WebPartExportVerb.cs
- Converter.cs
- ImageListImage.cs
- FixedLineResult.cs
- Transform3DGroup.cs
- CFGGrammar.cs
- QueryTaskGroupState.cs
- ThreadStartException.cs
- PowerModeChangedEventArgs.cs
- SettingsPropertyValue.cs
- HtmlHead.cs
- SqlDataSourceCommandEventArgs.cs
- WindowsMenu.cs
- MethodImplAttribute.cs
- CustomWebEventKey.cs
- UInt32Converter.cs
- SafeMILHandle.cs
- NameSpaceEvent.cs
- safex509handles.cs
- DbDataAdapter.cs
- TextFindEngine.cs
- JavaScriptObjectDeserializer.cs
- PromptBuilder.cs
- ScrollItemProviderWrapper.cs
- DesignerValidationSummaryAdapter.cs
- PermissionSetTriple.cs
- PolygonHotSpot.cs
- ConfigurationLocation.cs
- SHA1.cs
- CompilationSection.cs
- XmlSchemaSimpleType.cs
- XPathPatternBuilder.cs
- TrackingProfile.cs
- CompositeControl.cs
- DecimalConstantAttribute.cs
- FieldToken.cs
- StringDictionaryWithComparer.cs
- WebPartConnectionsCancelEventArgs.cs
- TextEmbeddedObject.cs
- GridViewColumnHeaderAutomationPeer.cs
- InvokeMethod.cs
- ResourceContainer.cs
- DbConnectionHelper.cs
- ButtonPopupAdapter.cs
- SafeEventHandle.cs
- Table.cs
- ListViewItemSelectionChangedEvent.cs
- uribuilder.cs
- MailWebEventProvider.cs
- PerfCounterSection.cs
- RemoteWebConfigurationHostStream.cs
- MethodCallConverter.cs
- GetMemberBinder.cs
- FontEmbeddingManager.cs
- EmptyEnumerator.cs
- SimplePropertyEntry.cs
- HostProtectionException.cs
- ElementAction.cs
- EventLevel.cs
- InteropBitmapSource.cs
- ParseHttpDate.cs
- InvalidStoreProtectionKeyException.cs
- UInt32Converter.cs
- InvalidPropValue.cs
- CatalogPart.cs
- PasswordTextContainer.cs
- XmlDesignerDataSourceView.cs
- UnsafeNativeMethods.cs
- XamlTreeBuilderBamlRecordWriter.cs
- GridViewCancelEditEventArgs.cs
- CqlGenerator.cs
- DecimalAverageAggregationOperator.cs
- Int32AnimationBase.cs
- TypePropertyEditor.cs
- Invariant.cs
- TdsParameterSetter.cs
- Point3D.cs
- Pen.cs
- PropertyInformation.cs
- BuildProviderCollection.cs
- SiteMapPath.cs
- WCFServiceClientProxyGenerator.cs
- WorkflowControlEndpoint.cs
- ValidationErrorEventArgs.cs
- WebPartExportVerb.cs