Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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
- Repeater.cs
- ProvidePropertyAttribute.cs
- EntityDataSourceWrapperCollection.cs
- LoadRetryAsyncResult.cs
- WebPartCatalogAddVerb.cs
- CallbackCorrelationInitializer.cs
- indexingfiltermarshaler.cs
- CodeDomConfigurationHandler.cs
- SessionStateSection.cs
- Overlapped.cs
- VisualBrush.cs
- DetailsViewUpdateEventArgs.cs
- VarInfo.cs
- TextParaClient.cs
- PropertyPathWorker.cs
- OracleNumber.cs
- WebPartPersonalization.cs
- Propagator.JoinPropagator.SubstitutingCloneVisitor.cs
- DataGridViewCellEventArgs.cs
- AnonymousIdentificationModule.cs
- DispatchChannelSink.cs
- ShapingEngine.cs
- ClientSettingsStore.cs
- EventWaitHandle.cs
- OrderedDictionary.cs
- NeutralResourcesLanguageAttribute.cs
- AsymmetricAlgorithm.cs
- AnonymousIdentificationModule.cs
- EntityAdapter.cs
- NativeObjectSecurity.cs
- HtmlInputSubmit.cs
- DecoderBestFitFallback.cs
- Normalization.cs
- InvalidWMPVersionException.cs
- Thumb.cs
- JumpItem.cs
- MailWebEventProvider.cs
- SettingsPropertyWrongTypeException.cs
- WebPartDescriptionCollection.cs
- SafeProcessHandle.cs
- PictureBox.cs
- OracleParameterBinding.cs
- DelegatingTypeDescriptionProvider.cs
- RoleService.cs
- BinaryFormatterWriter.cs
- UserPreferenceChangedEventArgs.cs
- Funcletizer.cs
- Assembly.cs
- DateTimeEditor.cs
- XmlSerializerSection.cs
- OdbcConnectionPoolProviderInfo.cs
- SqlParameterCollection.cs
- ImageSource.cs
- MsmqOutputChannel.cs
- FlowLayoutPanel.cs
- RC2.cs
- GetPageNumberCompletedEventArgs.cs
- ChangeDirector.cs
- EmptyControlCollection.cs
- TimeSpanSecondsConverter.cs
- ScriptHandlerFactory.cs
- ScriptControl.cs
- XamlGridLengthSerializer.cs
- BooleanExpr.cs
- GrammarBuilderRuleRef.cs
- MobileUserControlDesigner.cs
- RelationshipManager.cs
- ViewBase.cs
- SqlDataSourceSelectingEventArgs.cs
- QueryCursorEventArgs.cs
- ConfigurationElementCollection.cs
- SafeBitVector32.cs
- StringUtil.cs
- IdentityNotMappedException.cs
- XsltException.cs
- XmlC14NWriter.cs
- WorkerRequest.cs
- ToolStripOverflowButton.cs
- InfoCardProofToken.cs
- BindingMemberInfo.cs
- BitmapEffectDrawingContextState.cs
- AlphaSortedEnumConverter.cs
- HttpModuleActionCollection.cs
- StatusBarItem.cs
- TimeSpanStorage.cs
- RelativeSource.cs
- SqlCrossApplyToCrossJoin.cs
- BulletChrome.cs
- KeyValuePairs.cs
- CodeCompileUnit.cs
- DesignerProperties.cs
- Module.cs
- XPathDocumentNavigator.cs
- TextServicesCompartmentEventSink.cs
- IdnMapping.cs
- SiteMapNodeItem.cs
- ClientSettingsProvider.cs
- UpdateCompiler.cs
- Timer.cs
- DPAPIProtectedConfigurationProvider.cs