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
- DurationConverter.cs
- HttpRuntime.cs
- Select.cs
- GeometryValueSerializer.cs
- TextBoxLine.cs
- LambdaCompiler.Statements.cs
- TextTreeTextBlock.cs
- CancelEventArgs.cs
- XmlSchemaProviderAttribute.cs
- ListViewHitTestInfo.cs
- SelectingProviderEventArgs.cs
- ParallelTimeline.cs
- SimpleFileLog.cs
- ZipIOCentralDirectoryBlock.cs
- TextDecorationCollection.cs
- LocationReferenceEnvironment.cs
- DataControlField.cs
- StringUtil.cs
- DiffuseMaterial.cs
- coordinatorfactory.cs
- StringExpressionSet.cs
- TypeBuilderInstantiation.cs
- X509CertificateClaimSet.cs
- ListItem.cs
- RepeaterItem.cs
- Vector3DAnimationBase.cs
- CodeDomSerializerException.cs
- MethodRental.cs
- StringReader.cs
- OdbcDataAdapter.cs
- InstanceStore.cs
- ObjectDataSourceChooseTypePanel.cs
- ImageField.cs
- SecurityRuntime.cs
- ErrorHandlerFaultInfo.cs
- MultipleViewProviderWrapper.cs
- SynchronizationContextHelper.cs
- TableDetailsCollection.cs
- QueryAccessibilityHelpEvent.cs
- BitmapData.cs
- FrameworkObject.cs
- DummyDataSource.cs
- ActivitiesCollection.cs
- DbConnectionInternal.cs
- AccessedThroughPropertyAttribute.cs
- TailPinnedEventArgs.cs
- HtmlTernaryTree.cs
- MailAddress.cs
- ClientConvert.cs
- TemplateControlCodeDomTreeGenerator.cs
- DesignerVerbCollection.cs
- XmlUtil.cs
- InkPresenter.cs
- HwndAppCommandInputProvider.cs
- ReservationCollection.cs
- RegularExpressionValidator.cs
- HttpHandlerAction.cs
- ProjectionPlanCompiler.cs
- BaseAddressElementCollection.cs
- DuplicateContext.cs
- FormatterServices.cs
- SQLDoubleStorage.cs
- CacheDict.cs
- ToggleProviderWrapper.cs
- SqlDependencyListener.cs
- BoundsDrawingContextWalker.cs
- CommandEventArgs.cs
- DataServiceCollectionOfT.cs
- PersonalizableAttribute.cs
- HttpPostedFile.cs
- WebPartConnectionsCancelVerb.cs
- EdgeProfileValidation.cs
- CapabilitiesAssignment.cs
- LineGeometry.cs
- TimeoutValidationAttribute.cs
- XmlnsCompatibleWithAttribute.cs
- Int32CAMarshaler.cs
- XmlDictionary.cs
- EntityDataSourceViewSchema.cs
- ArrayTypeMismatchException.cs
- PathParser.cs
- DataGrid.cs
- DataReaderContainer.cs
- OutputCacheSettingsSection.cs
- RuntimeCompatibilityAttribute.cs
- EditorZoneBase.cs
- FrugalMap.cs
- XmlCollation.cs
- Currency.cs
- CodeRegionDirective.cs
- TableLayoutPanelDesigner.cs
- RoutedPropertyChangedEventArgs.cs
- DataGridItemEventArgs.cs
- GatewayIPAddressInformationCollection.cs
- MetadataException.cs
- TreeIterator.cs
- XslNumber.cs
- LookupNode.cs
- EventBuilder.cs
- TextBoxAutomationPeer.cs