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
- FactoryRecord.cs
- DefaultPrintController.cs
- InputReportEventArgs.cs
- CachedTypeface.cs
- CaretElement.cs
- Listbox.cs
- wmiprovider.cs
- SaveFileDialog.cs
- CommandBinding.cs
- DeferredTextReference.cs
- webproxy.cs
- ToRequest.cs
- CellQuery.cs
- FamilyMap.cs
- Char.cs
- Psha1DerivedKeyGeneratorHelper.cs
- OutputScopeManager.cs
- RoutedCommand.cs
- DependencyPropertyValueSerializer.cs
- ISFClipboardData.cs
- SqlBooleanMismatchVisitor.cs
- TextEditorSelection.cs
- PerformanceCounterNameAttribute.cs
- StaticExtensionConverter.cs
- TextTreeFixupNode.cs
- DefaultDialogButtons.cs
- InputReferenceExpression.cs
- RoleGroupCollectionEditor.cs
- SynchronizationFilter.cs
- VirtualizedItemPattern.cs
- ProtectedConfigurationSection.cs
- PropertyKey.cs
- QuerySelectOp.cs
- DetailsViewModeEventArgs.cs
- DesignUtil.cs
- InfoCardSymmetricCrypto.cs
- Root.cs
- StringConverter.cs
- CodeArgumentReferenceExpression.cs
- SpeechEvent.cs
- UserUseLicenseDictionaryLoader.cs
- ReferenceEqualityComparer.cs
- NavigationWindow.cs
- HTMLTagNameToTypeMapper.cs
- HistoryEventArgs.cs
- SR.cs
- PolicyManager.cs
- SelectingProviderEventArgs.cs
- BlockUIContainer.cs
- BinaryObjectInfo.cs
- DataGridViewCellCancelEventArgs.cs
- SubtreeProcessor.cs
- SchemaExporter.cs
- MenuItemAutomationPeer.cs
- WinEventHandler.cs
- HuffCodec.cs
- AnnouncementService.cs
- sqlstateclientmanager.cs
- WindowsGraphicsWrapper.cs
- ColumnTypeConverter.cs
- FileIOPermission.cs
- SerializableReadOnlyDictionary.cs
- GridEntryCollection.cs
- CustomWebEventKey.cs
- SmtpFailedRecipientException.cs
- FocusManager.cs
- ContextMenuService.cs
- storepermission.cs
- SynchronizationContext.cs
- ListViewTableRow.cs
- ProtocolViolationException.cs
- SolidColorBrush.cs
- KnownAssemblyEntry.cs
- CodeGenerator.cs
- ServicePerformanceCounters.cs
- MouseCaptureWithinProperty.cs
- SizeIndependentAnimationStorage.cs
- CodeDesigner.cs
- CategoryEditor.cs
- HandlerBase.cs
- CompositeTypefaceMetrics.cs
- XmlHierarchicalEnumerable.cs
- ModuleElement.cs
- StylusPointPropertyInfo.cs
- PolyLineSegmentFigureLogic.cs
- TypeConverterHelper.cs
- DocumentApplication.cs
- VisualTreeHelper.cs
- DebuggerAttributes.cs
- LongTypeConverter.cs
- MULTI_QI.cs
- HttpPostProtocolImporter.cs
- EntityDataSourceContextCreatingEventArgs.cs
- ProcessModelSection.cs
- CapabilitiesPattern.cs
- UnionExpr.cs
- ThreadExceptionDialog.cs
- WorkflowMarkupSerializationException.cs
- Facet.cs
- HtmlInputFile.cs