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
- MappingModelBuildProvider.cs
- SpeakProgressEventArgs.cs
- MasterPage.cs
- CodeAttributeDeclaration.cs
- Debug.cs
- CodeTypeParameter.cs
- CaseStatement.cs
- HttpDigestClientElement.cs
- WebConfigurationHost.cs
- RbTree.cs
- EventSetter.cs
- CoreSwitches.cs
- ChannelTerminatedException.cs
- URLMembershipCondition.cs
- TextParagraph.cs
- Grammar.cs
- HtmlGenericControl.cs
- ItemCollectionEditor.cs
- ReadOnlyHierarchicalDataSource.cs
- XmlSchemaInclude.cs
- AnimationClockResource.cs
- PassportAuthenticationModule.cs
- SafeSecurityHandles.cs
- WindowsFont.cs
- ChannelEndpointElementCollection.cs
- TagPrefixAttribute.cs
- SHA1Cng.cs
- SoapAttributeOverrides.cs
- SessionStateUtil.cs
- DesignerAdapterAttribute.cs
- RoutedCommand.cs
- Vector3DAnimationUsingKeyFrames.cs
- MimeWriter.cs
- dsa.cs
- MachineKeySection.cs
- SmtpClient.cs
- TextEffectResolver.cs
- FigureParagraph.cs
- SimpleParser.cs
- CheckBoxRenderer.cs
- ThreadInterruptedException.cs
- BaseParser.cs
- SchemaElement.cs
- QueryableDataSource.cs
- BindingNavigator.cs
- VariableReference.cs
- GlyphCache.cs
- FamilyMap.cs
- PrinterUnitConvert.cs
- SQLChars.cs
- SectionInput.cs
- AnnotationResourceCollection.cs
- LogReserveAndAppendState.cs
- SoapFormatter.cs
- ContextDataSource.cs
- ListenUriMode.cs
- BitArray.cs
- Helpers.cs
- ButtonChrome.cs
- ISCIIEncoding.cs
- StylusButtonCollection.cs
- UnaryNode.cs
- StorageEntitySetMapping.cs
- RoutedEventHandlerInfo.cs
- Material.cs
- ServiceOperationHelpers.cs
- SharedPersonalizationStateInfo.cs
- HtmlAnchor.cs
- Wrapper.cs
- EventDescriptor.cs
- FloatMinMaxAggregationOperator.cs
- XmlAttributeCache.cs
- DoubleLinkListEnumerator.cs
- IteratorFilter.cs
- ReadOnlyDictionary.cs
- OleDbConnection.cs
- HttpCapabilitiesEvaluator.cs
- ExitEventArgs.cs
- HotCommands.cs
- XPathNodeIterator.cs
- PointCollectionValueSerializer.cs
- BitmapDownload.cs
- XmlReflectionMember.cs
- Keyboard.cs
- DiscoveryClientChannelFactory.cs
- EmbeddedMailObject.cs
- DataGridViewCheckBoxColumn.cs
- BaseHashHelper.cs
- SHA384Managed.cs
- UriScheme.cs
- TextSpan.cs
- ProfileSettings.cs
- ErrorFormatter.cs
- Size3DConverter.cs
- TextElementCollection.cs
- AnimationStorage.cs
- CollectionViewGroupInternal.cs
- MultiView.cs
- DesignTimeDataBinding.cs
- RegexMatch.cs