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
- Mapping.cs
- SafeRsaProviderHandle.cs
- SequenceDesignerAccessibleObject.cs
- CodeTypeDelegate.cs
- SoapObjectInfo.cs
- DelegatedStream.cs
- DockPatternIdentifiers.cs
- GlyphRun.cs
- GeometryDrawing.cs
- UserControlBuildProvider.cs
- DataGridToolTip.cs
- ProtocolImporter.cs
- HGlobalSafeHandle.cs
- BaseDataListDesigner.cs
- StatusBarDrawItemEvent.cs
- MobileRedirect.cs
- Control.cs
- GridEntryCollection.cs
- GB18030Encoding.cs
- MultiTrigger.cs
- SchemaSetCompiler.cs
- SafeNativeMethodsMilCoreApi.cs
- InstanceCreationEditor.cs
- MetadataHelper.cs
- TableCellAutomationPeer.cs
- AgileSafeNativeMemoryHandle.cs
- XmlSchemaAnnotated.cs
- PerformanceCounter.cs
- WebPartZoneAutoFormat.cs
- SimpleHandlerFactory.cs
- ViewBox.cs
- HandlerBase.cs
- Matrix3D.cs
- CodeBinaryOperatorExpression.cs
- SqlBulkCopyColumnMapping.cs
- RSAPKCS1SignatureFormatter.cs
- IndexedEnumerable.cs
- ListenerBinder.cs
- MetadataCollection.cs
- DispatcherHooks.cs
- WhereQueryOperator.cs
- ThicknessConverter.cs
- LineServices.cs
- QueryOutputWriter.cs
- Scene3D.cs
- RtType.cs
- AttributeTableBuilder.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- FormViewCommandEventArgs.cs
- CompositeDataBoundControl.cs
- ButtonColumn.cs
- EventLogEntry.cs
- ToolStripOverflow.cs
- BindingExpression.cs
- ParsedAttributeCollection.cs
- LabelLiteral.cs
- Stack.cs
- UICuesEvent.cs
- HelloMessage11.cs
- XmlExceptionHelper.cs
- WindowsTokenRoleProvider.cs
- ListViewItem.cs
- OperationCanceledException.cs
- ExceptionUtil.cs
- StringToken.cs
- DbMetaDataColumnNames.cs
- ChangesetResponse.cs
- SpellerStatusTable.cs
- BitmapScalingModeValidation.cs
- XhtmlConformanceSection.cs
- RtfFormatStack.cs
- _NestedMultipleAsyncResult.cs
- PriorityBinding.cs
- ResourcePart.cs
- MarshalByRefObject.cs
- MobileUserControlDesigner.cs
- EndpointInfoCollection.cs
- DecimalAnimationUsingKeyFrames.cs
- CompiledRegexRunnerFactory.cs
- LinearGradientBrush.cs
- TextStore.cs
- SelectorAutomationPeer.cs
- ContainerUtilities.cs
- ProcessModule.cs
- UnsafeNativeMethods.cs
- RowUpdatedEventArgs.cs
- SqlDelegatedTransaction.cs
- TablePatternIdentifiers.cs
- ImageAutomationPeer.cs
- EncryptedData.cs
- RsaKeyGen.cs
- HMACMD5.cs
- AbsoluteQuery.cs
- ProviderConnectionPoint.cs
- FixedDocument.cs
- Decoder.cs
- MobileCapabilities.cs
- OleDbCommandBuilder.cs
- BamlStream.cs
- WindowsIPAddress.cs