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
- SqlAggregateChecker.cs
- IisTraceWebEventProvider.cs
- MLangCodePageEncoding.cs
- SoapExtensionImporter.cs
- PenContexts.cs
- FileLogRecordStream.cs
- RelationshipConverter.cs
- DataTableClearEvent.cs
- FormatConvertedBitmap.cs
- WebPartCancelEventArgs.cs
- ZipIOCentralDirectoryBlock.cs
- _Connection.cs
- XmlEncApr2001.cs
- DecoderExceptionFallback.cs
- httpapplicationstate.cs
- DataGridViewHitTestInfo.cs
- HttpModuleActionCollection.cs
- BaseParser.cs
- ConfigurationPermission.cs
- SEHException.cs
- __Filters.cs
- XmlCollation.cs
- HelpInfo.cs
- NotifyParentPropertyAttribute.cs
- Site.cs
- EntityDataSourceMemberPath.cs
- RelationshipEndCollection.cs
- ConfigurationValidatorAttribute.cs
- KeyedQueue.cs
- DeviceSpecificDialogCachedState.cs
- ValueOfAction.cs
- HyperLinkDesigner.cs
- MetadataSource.cs
- COAUTHINFO.cs
- SQLRoleProvider.cs
- Boolean.cs
- PersonalizationProviderHelper.cs
- XmlBaseWriter.cs
- RelationshipDetailsRow.cs
- Stream.cs
- TimeSpan.cs
- DescendentsWalker.cs
- DrawingContextDrawingContextWalker.cs
- ComponentCollection.cs
- Error.cs
- ModifierKeysValueSerializer.cs
- XsltSettings.cs
- HTTPNotFoundHandler.cs
- GridViewEditEventArgs.cs
- TextElementEnumerator.cs
- CodeSubDirectory.cs
- CacheRequest.cs
- MetadataCache.cs
- GuidConverter.cs
- GeneralTransform.cs
- ConversionHelper.cs
- SessionStateUtil.cs
- ColumnCollection.cs
- DataTableReader.cs
- ErrorFormatter.cs
- AutomationPatternInfo.cs
- OpCopier.cs
- SqlNodeAnnotation.cs
- SettingsAttributes.cs
- OutputChannel.cs
- Image.cs
- HtmlInputImage.cs
- InputScope.cs
- ButtonBase.cs
- TypeLibConverter.cs
- WsdlInspector.cs
- CodeMemberEvent.cs
- _LocalDataStoreMgr.cs
- FrugalMap.cs
- log.cs
- ScalarType.cs
- DelegateSerializationHolder.cs
- Color.cs
- Label.cs
- WebScriptEndpointElement.cs
- TemplateBindingExtensionConverter.cs
- LongSumAggregationOperator.cs
- ExecutionProperties.cs
- Operators.cs
- RegexBoyerMoore.cs
- autovalidator.cs
- MethodExpr.cs
- TreeNodeConverter.cs
- CacheSection.cs
- IndexedEnumerable.cs
- PropertyItemInternal.cs
- SafeRightsManagementPubHandle.cs
- SqlConnection.cs
- SqlError.cs
- ProcessStartInfo.cs
- SqlNode.cs
- SelectionHighlightInfo.cs
- CreateUserErrorEventArgs.cs
- DllNotFoundException.cs
- Menu.cs