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
- MonitorWrapper.cs
- WindowsListViewGroupSubsetLink.cs
- SystemPens.cs
- TreeNodeStyle.cs
- IfJoinedCondition.cs
- UrlPath.cs
- XmlSchemaParticle.cs
- ViewManager.cs
- GridViewDeletedEventArgs.cs
- XmlSerializableServices.cs
- _SpnDictionary.cs
- _SslState.cs
- WSIdentityFaultException.cs
- QuaternionConverter.cs
- HostedTransportConfigurationBase.cs
- MetadataSerializer.cs
- Point.cs
- DataBindingHandlerAttribute.cs
- TextTreeTextBlock.cs
- DataTemplate.cs
- DataProtection.cs
- PeerCredential.cs
- SpnEndpointIdentity.cs
- EventBuilder.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- FormViewRow.cs
- X509Chain.cs
- XmlExpressionDumper.cs
- LongValidator.cs
- FixedPageAutomationPeer.cs
- DataListItemEventArgs.cs
- controlskin.cs
- VolatileEnlistmentState.cs
- ReadOnlyDictionary.cs
- SizeFConverter.cs
- TypeHelpers.cs
- TimeZone.cs
- DefaultPrintController.cs
- DictionarySectionHandler.cs
- FixedBufferAttribute.cs
- CodeVariableReferenceExpression.cs
- TimeoutException.cs
- SamlSubjectStatement.cs
- Command.cs
- DescendantOverDescendantQuery.cs
- AxHost.cs
- ParameterElementCollection.cs
- SID.cs
- COMException.cs
- TextMarkerSource.cs
- mil_sdk_version.cs
- InkCanvasSelection.cs
- TypeDescriptor.cs
- CompiledScopeCriteria.cs
- BoundField.cs
- Converter.cs
- LinearKeyFrames.cs
- BooleanStorage.cs
- FixUp.cs
- BatchWriter.cs
- FormsAuthenticationTicket.cs
- DesignerForm.cs
- SqlBuffer.cs
- FormsAuthentication.cs
- GeometryCollection.cs
- DebugInfoExpression.cs
- ToolbarAUtomationPeer.cs
- EnumMember.cs
- LongSumAggregationOperator.cs
- _Connection.cs
- BindingNavigatorDesigner.cs
- EntityKey.cs
- QueryProcessor.cs
- StateMachine.cs
- Canvas.cs
- TypeElement.cs
- HttpCookiesSection.cs
- ParameterBuilder.cs
- _DynamicWinsockMethods.cs
- HeaderFilter.cs
- SwitchLevelAttribute.cs
- MarkedHighlightComponent.cs
- Missing.cs
- SystemIPGlobalProperties.cs
- SingleSelectRootGridEntry.cs
- WindowsStatic.cs
- PenLineCapValidation.cs
- PropVariant.cs
- Geometry3D.cs
- CollectionBase.cs
- MenuItemBinding.cs
- RequestTimeoutManager.cs
- ManagedWndProcTracker.cs
- HtmlTableRowCollection.cs
- __ComObject.cs
- FileDialogCustomPlacesCollection.cs
- DesignerLinkAdapter.cs
- AsyncPostBackErrorEventArgs.cs
- ObjectItemAttributeAssemblyLoader.cs
- Drawing.cs