Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / Xml / System / Xml / XPath / Internal / ContextQuery.cs / 1 / ContextQuery.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; internal class ContextQuery : Query { protected XPathNavigator contextNode; public ContextQuery() { this.count = 0; } protected ContextQuery(ContextQuery other) : base(other) { this.contextNode = other.contextNode; // Don't need to clone here } public override void Reset() { count = 0; } public override XPathNavigator Current { get { return contextNode; } } public override object Evaluate(XPathNodeIterator context) { contextNode = context.Current; // We don't clone here. Because we never move it. count = 0; return this; } public override XPathNavigator Advance() { if (count == 0) { count = 1; return contextNode; } return null; } public override XPathNavigator MatchNode(XPathNavigator current) { return current; } public override XPathNodeIterator Clone() { return new ContextQuery(this); } public override XPathResultType StaticType { get { return XPathResultType.NodeSet; } } public override int CurrentPosition { get { return count; } } public override int Count { get { return 1; } } 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
- WindowsContainer.cs
- _TransmitFileOverlappedAsyncResult.cs
- RegexCaptureCollection.cs
- NetworkStream.cs
- ImageListUtils.cs
- UserNameSecurityTokenProvider.cs
- DbCommandTree.cs
- ClockController.cs
- AuthenticationManager.cs
- CookieParameter.cs
- WindowsScrollBar.cs
- TypeBinaryExpression.cs
- AggregatePushdown.cs
- Comparer.cs
- NamespaceQuery.cs
- ScriptingProfileServiceSection.cs
- DesignerLoader.cs
- Lease.cs
- messageonlyhwndwrapper.cs
- UserControlBuildProvider.cs
- EventMappingSettings.cs
- SQLDateTimeStorage.cs
- ObjectNavigationPropertyMapping.cs
- Triplet.cs
- ResourceReferenceExpressionConverter.cs
- IntSecurity.cs
- ParallelRangeManager.cs
- ClientRuntimeConfig.cs
- ToolboxItemAttribute.cs
- WmlListAdapter.cs
- GatewayIPAddressInformationCollection.cs
- IFlowDocumentViewer.cs
- altserialization.cs
- rsa.cs
- DataBinder.cs
- Geometry3D.cs
- SortDescription.cs
- ValidationEventArgs.cs
- DropDownButton.cs
- NullableIntMinMaxAggregationOperator.cs
- formatstringdialog.cs
- TextElement.cs
- SqlDelegatedTransaction.cs
- TypedTableGenerator.cs
- Mapping.cs
- ControlBuilderAttribute.cs
- WebBrowser.cs
- UnknownBitmapDecoder.cs
- XmlAttributeOverrides.cs
- ContentType.cs
- Animatable.cs
- HtmlFormWrapper.cs
- WebEncodingValidatorAttribute.cs
- configsystem.cs
- ClosableStream.cs
- GlobalEventManager.cs
- AccessDataSourceWizardForm.cs
- WindowsScroll.cs
- ToolStripItemGlyph.cs
- ModelFunction.cs
- CurrencyWrapper.cs
- Helpers.cs
- SafeRightsManagementSessionHandle.cs
- TickBar.cs
- CompleteWizardStep.cs
- ChtmlPageAdapter.cs
- ComboBox.cs
- sqlinternaltransaction.cs
- X509CertificateStore.cs
- DataRowView.cs
- SettingsPropertyIsReadOnlyException.cs
- ECDiffieHellman.cs
- RecordManager.cs
- EncodingDataItem.cs
- OpacityConverter.cs
- Int32Converter.cs
- ImportCatalogPart.cs
- MatchingStyle.cs
- SQLInt32Storage.cs
- AQNBuilder.cs
- SecurityContext.cs
- SqlGatherProducedAliases.cs
- RemotingServices.cs
- CustomAttributeFormatException.cs
- Int16.cs
- HttpProfileBase.cs
- SqlTypesSchemaImporter.cs
- StylusPlugInCollection.cs
- XsdDuration.cs
- ElementsClipboardData.cs
- IdentityNotMappedException.cs
- Content.cs
- Rect.cs
- ObjectParameterCollection.cs
- QueryCreatedEventArgs.cs
- ChangeBlockUndoRecord.cs
- DefaultPropertyAttribute.cs
- Exceptions.cs
- _TLSstream.cs
- ProviderConnectionPointCollection.cs