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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- IgnoreFileBuildProvider.cs
- InputLanguageManager.cs
- ObjectDataProvider.cs
- DocumentGridPage.cs
- PerformanceCountersBase.cs
- FontNamesConverter.cs
- NameValueCollection.cs
- ProxyAttribute.cs
- LingerOption.cs
- WebDescriptionAttribute.cs
- odbcmetadatacolumnnames.cs
- TypeValidationEventArgs.cs
- RootProfilePropertySettingsCollection.cs
- TreeViewHitTestInfo.cs
- UpdateCommand.cs
- DropSource.cs
- QueryStringHandler.cs
- DefaultPrintController.cs
- RowCache.cs
- WmlPhoneCallAdapter.cs
- IndexedDataBuffer.cs
- FillBehavior.cs
- SafeSecurityHandles.cs
- XmlAnyElementAttribute.cs
- CaseStatementProjectedSlot.cs
- CompositeFontInfo.cs
- FloaterParaClient.cs
- GcSettings.cs
- ApplicationBuildProvider.cs
- TextServicesContext.cs
- SemanticBasicElement.cs
- SqlClientPermission.cs
- CorrelationQuery.cs
- ElasticEase.cs
- SingleAnimationBase.cs
- BindingBase.cs
- RightsManagementErrorHandler.cs
- baseshape.cs
- XmlWrappingReader.cs
- ContractsBCL.cs
- SafeFileMappingHandle.cs
- SimpleHandlerFactory.cs
- IISUnsafeMethods.cs
- ContentElementCollection.cs
- UIElementParaClient.cs
- ListViewCommandEventArgs.cs
- PersonalizationDictionary.cs
- SkewTransform.cs
- TableCellCollection.cs
- MSG.cs
- securitycriticaldataClass.cs
- BindableAttribute.cs
- VirtualizingStackPanel.cs
- ClipboardProcessor.cs
- LOSFormatter.cs
- TextServicesDisplayAttributePropertyRanges.cs
- OrderedDictionaryStateHelper.cs
- AQNBuilder.cs
- MarshalByRefObject.cs
- FormClosedEvent.cs
- Validator.cs
- DomNameTable.cs
- SwitchLevelAttribute.cs
- AQNBuilder.cs
- NCryptSafeHandles.cs
- SqlDataSource.cs
- IgnoreDataMemberAttribute.cs
- MembershipPasswordException.cs
- SafeFileMappingHandle.cs
- SerialPort.cs
- ToolStripItemImageRenderEventArgs.cs
- TrustLevelCollection.cs
- RSAPKCS1KeyExchangeFormatter.cs
- GZipStream.cs
- FilterableData.cs
- SortedList.cs
- Errors.cs
- InternalDispatchObject.cs
- ValueSerializerAttribute.cs
- SafeCoTaskMem.cs
- DisplayNameAttribute.cs
- WebPartConnectionsDisconnectVerb.cs
- PrincipalPermission.cs
- InspectionWorker.cs
- ConfigurationSettings.cs
- SettingsPropertyWrongTypeException.cs
- VirtualizedContainerService.cs
- IssuedSecurityTokenParameters.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- TailCallAnalyzer.cs
- SrgsSubset.cs
- NullRuntimeConfig.cs
- QilList.cs
- InfoCardPolicy.cs
- RegexFCD.cs
- SendDesigner.xaml.cs
- PathParser.cs
- FilePresentation.cs
- FixedTextBuilder.cs
- PixelFormat.cs