Code:
/ DotNET / DotNET / 8.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
- MediaPlayer.cs
- DataGridViewAdvancedBorderStyle.cs
- TableLayoutSettings.cs
- HMACRIPEMD160.cs
- RawStylusInputReport.cs
- CssStyleCollection.cs
- TextTrailingCharacterEllipsis.cs
- InputScopeNameConverter.cs
- EnumConverter.cs
- CellTreeNode.cs
- RoleGroupCollection.cs
- MembershipUser.cs
- DbConnectionInternal.cs
- ComNativeDescriptor.cs
- CacheRequest.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- SqlMethodTransformer.cs
- SQLString.cs
- TransportationConfigurationTypeInstallComponent.cs
- MetadataCacheItem.cs
- Int64AnimationUsingKeyFrames.cs
- XmlValidatingReader.cs
- SqlXmlStorage.cs
- MetadataCache.cs
- ipaddressinformationcollection.cs
- SizeFConverter.cs
- SubMenuStyle.cs
- TextTreePropertyUndoUnit.cs
- RuntimeCompatibilityAttribute.cs
- RequestDescription.cs
- FlowSwitch.cs
- GroupItemAutomationPeer.cs
- CultureMapper.cs
- Token.cs
- StyleBamlRecordReader.cs
- TypeHelpers.cs
- DataKey.cs
- OracleParameterCollection.cs
- XslTransformFileEditor.cs
- XmlSerializableServices.cs
- mongolianshape.cs
- TableLayoutPanelDesigner.cs
- ReadOnlyHierarchicalDataSource.cs
- DbDataRecord.cs
- AdornerHitTestResult.cs
- ConnectionStringSettingsCollection.cs
- ReachSerializationUtils.cs
- PeerEndPoint.cs
- Utils.cs
- CodePrimitiveExpression.cs
- UnmanagedMarshal.cs
- WebPartDisplayModeEventArgs.cs
- AnchoredBlock.cs
- _FtpControlStream.cs
- GroupDescription.cs
- Activator.cs
- ResourcesGenerator.cs
- BoundField.cs
- TimelineGroup.cs
- AttachInfo.cs
- DetailsViewPagerRow.cs
- TextEffect.cs
- IDictionary.cs
- PermissionSetEnumerator.cs
- DiagnosticsElement.cs
- Closure.cs
- AsyncOperation.cs
- DocumentXmlWriter.cs
- DesignerAdapterAttribute.cs
- SqlMultiplexer.cs
- XmlSerializerVersionAttribute.cs
- safesecurityhelperavalon.cs
- DefaultValueConverter.cs
- XmlSchemaCompilationSettings.cs
- HTTPNotFoundHandler.cs
- IntegrationExceptionEventArgs.cs
- TextOutput.cs
- TextRangeSerialization.cs
- OracleSqlParser.cs
- PropertyGeneratedEventArgs.cs
- Pkcs7Recipient.cs
- ListDesigner.cs
- XmlSchemaSimpleContent.cs
- NamespaceInfo.cs
- SharedPersonalizationStateInfo.cs
- DataGridPageChangedEventArgs.cs
- GridSplitterAutomationPeer.cs
- WebEncodingValidator.cs
- ChangeInterceptorAttribute.cs
- ClientSettingsStore.cs
- PersonalizationAdministration.cs
- ErrorActivity.cs
- ReadWriteControlDesigner.cs
- OleDbRowUpdatingEvent.cs
- SystemDiagnosticsSection.cs
- DynamicObjectAccessor.cs
- CalculatedColumn.cs
- DataRowCollection.cs
- RangeValidator.cs
- DelegateSerializationHolder.cs