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
- DataStorage.cs
- UIElement.cs
- RequestedSignatureDialog.cs
- EUCJPEncoding.cs
- AstTree.cs
- SurrogateSelector.cs
- ZipIOExtraFieldElement.cs
- Inflater.cs
- Size3D.cs
- SoapTypeAttribute.cs
- ManualWorkflowSchedulerService.cs
- IssuanceTokenProviderState.cs
- IdleTimeoutMonitor.cs
- SecureEnvironment.cs
- ServiceContractViewControl.cs
- WaitHandle.cs
- Binding.cs
- RowToParametersTransformer.cs
- ItemContainerGenerator.cs
- ForeignConstraint.cs
- CompilerResults.cs
- SecUtil.cs
- InternalResources.cs
- OleDbPropertySetGuid.cs
- HelpProvider.cs
- FloatUtil.cs
- MethodToken.cs
- ParameterElementCollection.cs
- HostingEnvironmentException.cs
- XmlPreloadedResolver.cs
- FontCollection.cs
- ToolStripOverflow.cs
- DeclarationUpdate.cs
- SiteMapDataSourceView.cs
- List.cs
- ThreadSafeList.cs
- ApplicationSecurityInfo.cs
- ADMembershipProvider.cs
- PropertyChangedEventArgs.cs
- DictionaryGlobals.cs
- MiniMapControl.xaml.cs
- TextEndOfLine.cs
- CreationContext.cs
- SerializationInfoEnumerator.cs
- Timer.cs
- SuppressMessageAttribute.cs
- HandlerFactoryWrapper.cs
- IpcChannelHelper.cs
- TriggerBase.cs
- GeneratedContractType.cs
- PersonalizationAdministration.cs
- PerformanceCounter.cs
- ExpandSegmentCollection.cs
- OdbcStatementHandle.cs
- EntityDataSourceDataSelectionPanel.cs
- DataStorage.cs
- CompoundFileReference.cs
- TextBlockAutomationPeer.cs
- XslAstAnalyzer.cs
- EnumMember.cs
- SecurityTokenProvider.cs
- ZoneIdentityPermission.cs
- ConfigViewGenerator.cs
- ListBindingHelper.cs
- PerspectiveCamera.cs
- Speller.cs
- ClientOptions.cs
- SystemIPGlobalStatistics.cs
- XmlLanguageConverter.cs
- CodeDirectionExpression.cs
- HeaderedContentControl.cs
- MemberRelationshipService.cs
- PersonalizationProvider.cs
- BindableTemplateBuilder.cs
- Int32AnimationUsingKeyFrames.cs
- Constraint.cs
- TypeSystem.cs
- CalendarDay.cs
- SByte.cs
- HttpWebRequest.cs
- Imaging.cs
- ChildrenQuery.cs
- QuaternionRotation3D.cs
- CalloutQueueItem.cs
- BindingOperations.cs
- TypeSystemProvider.cs
- ServicePoint.cs
- MenuItemCollection.cs
- AxisAngleRotation3D.cs
- Base64Decoder.cs
- XmlObjectSerializerContext.cs
- PropertyMappingExceptionEventArgs.cs
- CustomBinding.cs
- XmlEnumAttribute.cs
- WindowsSecurityTokenAuthenticator.cs
- ListMarkerLine.cs
- PersistenceException.cs
- EdmPropertyAttribute.cs
- StylusPointPropertyInfo.cs
- BaseCAMarshaler.cs