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
- MemberJoinTreeNode.cs
- AudioDeviceOut.cs
- DataServiceRequestArgs.cs
- InputScopeManager.cs
- ResourceExpressionBuilder.cs
- EventNotify.cs
- TableCellCollection.cs
- SmiContextFactory.cs
- Ops.cs
- Attributes.cs
- EndPoint.cs
- DocComment.cs
- DataGridColumn.cs
- LocalizationCodeDomSerializer.cs
- HostingEnvironmentSection.cs
- XPathNodeIterator.cs
- EmptyReadOnlyDictionaryInternal.cs
- Tile.cs
- SortQueryOperator.cs
- WSSecurityOneDotZeroSendSecurityHeader.cs
- TagMapInfo.cs
- EventPropertyMap.cs
- CultureInfo.cs
- EntityParameter.cs
- EditableTreeList.cs
- PageThemeParser.cs
- ListControlConvertEventArgs.cs
- XmlSchemaType.cs
- SystemParameters.cs
- ParentQuery.cs
- WriterOutput.cs
- VirtualPathUtility.cs
- EditorZoneBase.cs
- JsonCollectionDataContract.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- XmlImplementation.cs
- X509SecurityToken.cs
- XmlILCommand.cs
- SQLRoleProvider.cs
- SQLInt32.cs
- FormViewPagerRow.cs
- DrawingCollection.cs
- SqlVisitor.cs
- CollectionChangedEventManager.cs
- FigureParaClient.cs
- COM2FontConverter.cs
- EntryPointNotFoundException.cs
- RegularExpressionValidator.cs
- VarRefManager.cs
- HostingEnvironmentWrapper.cs
- KeyFrames.cs
- LineMetrics.cs
- DeferrableContentConverter.cs
- XmlUtf8RawTextWriter.cs
- LinkArea.cs
- AvtEvent.cs
- IPAddressCollection.cs
- ExpressionBuilderCollection.cs
- BinaryFormatter.cs
- ObjectListDataBindEventArgs.cs
- WebPartTransformerCollection.cs
- ServiceChannelFactory.cs
- ImageButton.cs
- BufferBuilder.cs
- CheckedPointers.cs
- ApplicationProxyInternal.cs
- HexParser.cs
- CounterSet.cs
- PropertyChangingEventArgs.cs
- WebPartConnectionsConfigureVerb.cs
- CompilerError.cs
- HttpResponse.cs
- XXXInfos.cs
- CapabilitiesUse.cs
- CancellationScope.cs
- OrderPreservingMergeHelper.cs
- Accessible.cs
- HttpResponse.cs
- HelpFileFileNameEditor.cs
- RoleService.cs
- ProviderIncompatibleException.cs
- WorkflowEventArgs.cs
- InstanceHandleConflictException.cs
- LineMetrics.cs
- XmlSchemaFacet.cs
- Types.cs
- QuestionEventArgs.cs
- SubtreeProcessor.cs
- CodePrimitiveExpression.cs
- DisplayInformation.cs
- PublisherIdentityPermission.cs
- DiscoveryClientElement.cs
- PenContext.cs
- datacache.cs
- HttpRuntimeSection.cs
- DocumentXmlWriter.cs
- PageRequestManager.cs
- TemplateXamlParser.cs
- TemplatedAdorner.cs
- HtmlTitle.cs