Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / XPath / Internal / ParentQuery.cs / 1305376 / 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. // //[....] //----------------------------------------------------------------------------- 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DesignerLoader.cs
- DataGridViewUtilities.cs
- GroupQuery.cs
- SystemNetworkInterface.cs
- PowerEase.cs
- SingleAnimationBase.cs
- COSERVERINFO.cs
- FlowDocumentReader.cs
- WebConfigurationHostFileChange.cs
- MasterPageCodeDomTreeGenerator.cs
- ReadOnlyCollectionBase.cs
- XslTransform.cs
- ErrorHandler.cs
- XmlDesignerDataSourceView.cs
- HttpBrowserCapabilitiesBase.cs
- XPathNodeInfoAtom.cs
- AnimationException.cs
- TableDetailsCollection.cs
- KeyToListMap.cs
- BrowserCapabilitiesFactory.cs
- EncodingTable.cs
- TableItemStyle.cs
- SchemaNotation.cs
- SocketElement.cs
- TypeReference.cs
- XmlMembersMapping.cs
- TreeNode.cs
- DayRenderEvent.cs
- HttpProfileBase.cs
- XmlCodeExporter.cs
- PopOutPanel.cs
- Input.cs
- OperationGenerator.cs
- ZipIOModeEnforcingStream.cs
- mactripleDES.cs
- GenericTypeParameterBuilder.cs
- ParamArrayAttribute.cs
- SemaphoreSecurity.cs
- WorkflowDesignerMessageFilter.cs
- PolyLineSegment.cs
- RuntimeHandles.cs
- StructuredProperty.cs
- QueryPageSettingsEventArgs.cs
- ProviderSettings.cs
- SrgsRulesCollection.cs
- UnmanagedHandle.cs
- StringArrayConverter.cs
- GeneralTransform.cs
- DesigntimeLicenseContext.cs
- SafeProcessHandle.cs
- PerformanceCounterManager.cs
- InvalidComObjectException.cs
- UnsafeNativeMethods.cs
- ResourceAssociationSet.cs
- IPEndPoint.cs
- DesignSurfaceCollection.cs
- CoreSwitches.cs
- Vector3DConverter.cs
- ClientScriptItemCollection.cs
- TabItemWrapperAutomationPeer.cs
- TableCell.cs
- TextServicesProperty.cs
- StructureChangedEventArgs.cs
- Rotation3DAnimation.cs
- SafeLocalMemHandle.cs
- EntityTransaction.cs
- OracleBFile.cs
- PageHandlerFactory.cs
- DynamicRendererThreadManager.cs
- RepeaterItem.cs
- DictationGrammar.cs
- Nullable.cs
- CompileXomlTask.cs
- UdpDiscoveryMessageFilter.cs
- Span.cs
- DataSourceConverter.cs
- TableCell.cs
- XmlCharCheckingReader.cs
- InOutArgument.cs
- BindingNavigator.cs
- DataGridViewRowsRemovedEventArgs.cs
- PrintControllerWithStatusDialog.cs
- EdmConstants.cs
- TrackingAnnotationCollection.cs
- BuiltInPermissionSets.cs
- AssertSection.cs
- DbParameterHelper.cs
- AnonymousIdentificationSection.cs
- CommonRemoteMemoryBlock.cs
- TreeIterators.cs
- dataobject.cs
- WebPartConnectionsEventArgs.cs
- Compiler.cs
- StringUtil.cs
- IPAddress.cs
- Zone.cs
- CompressionTransform.cs
- BitmapEffectGroup.cs
- XamlStyleSerializer.cs
- AliasedSlot.cs