Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Xml / System / Xml / XPath / Internal / ParentQuery.cs / 1 / ParentQuery.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;
using System.Globalization;
using System.Collections.Generic;
internal sealed class ParentQuery : CacheAxisQuery {
public ParentQuery(Query qyInput, string Name, string Prefix, XPathNodeType Type) : base(qyInput, Name, Prefix, Type) {}
private ParentQuery(ParentQuery other) : base(other) { }
public override object Evaluate(XPathNodeIterator context) {
base.Evaluate(context);
//
XPathNavigator input;
while ((input = qyInput.Advance()) != null) {
input = input.Clone();
if (input.MoveToParent()) {
if (matches(input)) {
Insert(outputBuffer, input);
}
}
}
return this;
}
public override XPathNodeIterator Clone() { return new ParentQuery(this); }
}
}
// 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
- InfoCardSymmetricAlgorithm.cs
- FrameworkTemplate.cs
- BackgroundFormatInfo.cs
- ColumnBinding.cs
- SequentialOutput.cs
- SqlProviderManifest.cs
- RawStylusInputReport.cs
- ByteRangeDownloader.cs
- PermissionSet.cs
- MailBnfHelper.cs
- XPathNavigatorKeyComparer.cs
- OledbConnectionStringbuilder.cs
- StaticExtension.cs
- RectIndependentAnimationStorage.cs
- Timeline.cs
- RuntimeArgumentHandle.cs
- SystemKeyConverter.cs
- HiddenField.cs
- DrawingAttributes.cs
- EmptyEnumerator.cs
- CommandHelper.cs
- UserControlParser.cs
- NotCondition.cs
- RelatedCurrencyManager.cs
- SystemThemeKey.cs
- CacheForPrimitiveTypes.cs
- ProxyHwnd.cs
- SoapAttributeAttribute.cs
- DynamicResourceExtensionConverter.cs
- AutomationEventArgs.cs
- CodeObject.cs
- TextBounds.cs
- ActivationArguments.cs
- SafeNativeMethods.cs
- AssemblyEvidenceFactory.cs
- RuleConditionDialog.cs
- DbReferenceCollection.cs
- OrderedDictionaryStateHelper.cs
- SqlExpander.cs
- InboundActivityHelper.cs
- BamlCollectionHolder.cs
- WebWorkflowRole.cs
- SerializationObjectManager.cs
- XmlNamespaceMapping.cs
- JoinCqlBlock.cs
- TriggerAction.cs
- HttpRequestCacheValidator.cs
- CodeParameterDeclarationExpressionCollection.cs
- HtmlLabelAdapter.cs
- RC2.cs
- UIAgentAsyncParams.cs
- ResourceIDHelper.cs
- CompiledQueryCacheEntry.cs
- KeyGestureConverter.cs
- TreeViewDesigner.cs
- XmlAttributeHolder.cs
- remotingproxy.cs
- WinEventWrap.cs
- MultipartContentParser.cs
- ClientRuntimeConfig.cs
- ToolStripItemClickedEventArgs.cs
- SchemaElementDecl.cs
- StorageSetMapping.cs
- InternalConfigRoot.cs
- SequenceRangeCollection.cs
- XmlnsCache.cs
- CodeEventReferenceExpression.cs
- FormClosingEvent.cs
- SemaphoreSecurity.cs
- GridItemCollection.cs
- QilIterator.cs
- EnvironmentPermission.cs
- HandleRef.cs
- XPathNode.cs
- ConfigurationValidatorBase.cs
- DataTable.cs
- _ProxyChain.cs
- TextElementEnumerator.cs
- OleDbException.cs
- CheckBoxList.cs
- OdbcStatementHandle.cs
- QilLoop.cs
- SharedPersonalizationStateInfo.cs
- XmlAnyElementAttribute.cs
- List.cs
- NativeCppClassAttribute.cs
- IdleTimeoutMonitor.cs
- WasEndpointConfigContainer.cs
- BezierSegment.cs
- WebPartTransformerCollection.cs
- RoleManagerSection.cs
- DefaultBindingPropertyAttribute.cs
- HtmlListAdapter.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- SelectorItemAutomationPeer.cs
- CacheSection.cs
- LicFileLicenseProvider.cs
- XPathNavigatorReader.cs
- ImageDrawing.cs
- GetWinFXPath.cs