Code:
/ DotNET / DotNET / 8.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
- SupportingTokenProviderSpecification.cs
- ToolBarButtonDesigner.cs
- ConnectivityStatus.cs
- ItemDragEvent.cs
- ConversionHelper.cs
- EntityStoreSchemaGenerator.cs
- AssemblyHash.cs
- UserValidatedEventArgs.cs
- UIPermission.cs
- IImplicitResourceProvider.cs
- ChannelFactoryRefCache.cs
- DetailsViewRow.cs
- DoubleLinkListEnumerator.cs
- SecurityContextSecurityToken.cs
- DataFormat.cs
- SemaphoreSecurity.cs
- OleDbRowUpdatingEvent.cs
- ClickablePoint.cs
- PersonalizationStateInfoCollection.cs
- TypeDelegator.cs
- DataPagerField.cs
- IImplicitResourceProvider.cs
- SmiGettersStream.cs
- basecomparevalidator.cs
- TextTreeTextNode.cs
- TextTreePropertyUndoUnit.cs
- EmptyStringExpandableObjectConverter.cs
- PrintDialogDesigner.cs
- StylusEditingBehavior.cs
- SecurityDescriptor.cs
- WindowManager.cs
- CaseCqlBlock.cs
- WindowShowOrOpenTracker.cs
- WinInet.cs
- QualifiedCellIdBoolean.cs
- SafeEventHandle.cs
- TTSEngineTypes.cs
- CodeBlockBuilder.cs
- TrackingLocationCollection.cs
- ReachDocumentReferenceSerializerAsync.cs
- NullableConverter.cs
- GridViewDeleteEventArgs.cs
- TextEditor.cs
- NativeActivity.cs
- FunctionParameter.cs
- TextCollapsingProperties.cs
- StreamAsIStream.cs
- TypeUnloadedException.cs
- ResourceDescriptionAttribute.cs
- DataRow.cs
- keycontainerpermission.cs
- SuspendDesigner.cs
- HGlobalSafeHandle.cs
- HttpClientProtocol.cs
- EditorPartChrome.cs
- StyleSheet.cs
- CngProvider.cs
- prefixendpointaddressmessagefilter.cs
- HMACSHA1.cs
- XmlDataImplementation.cs
- ArrayWithOffset.cs
- SchemaTypeEmitter.cs
- MatrixAnimationBase.cs
- SyndicationContent.cs
- StringInfo.cs
- ProfileBuildProvider.cs
- ElementsClipboardData.cs
- CalendarDayButton.cs
- RecognizerBase.cs
- ProtectedConfiguration.cs
- DataGridViewTopRowAccessibleObject.cs
- MimeWriter.cs
- HttpApplication.cs
- ScriptRef.cs
- DataGridPagerStyle.cs
- ChannelTraceRecord.cs
- FixedTextSelectionProcessor.cs
- NativeMethodsOther.cs
- ZipIOLocalFileDataDescriptor.cs
- TagMapInfo.cs
- SizeAnimationClockResource.cs
- PropertyGridView.cs
- DBBindings.cs
- TransformGroup.cs
- SafeTimerHandle.cs
- WebPartMenu.cs
- mediapermission.cs
- CngAlgorithmGroup.cs
- FileLogRecordHeader.cs
- NavigatorInput.cs
- SqlProfileProvider.cs
- TextRunProperties.cs
- SpellerHighlightLayer.cs
- PresentationTraceSources.cs
- NamespaceList.cs
- CompositeScriptReference.cs
- TypeInitializationException.cs
- FixedFlowMap.cs
- FacetDescriptionElement.cs
- PointLightBase.cs