Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / XPath / Internal / MergeFilterQuery.cs / 1305376 / MergeFilterQuery.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.Xml.Xsl; using System.Collections.Generic; internal sealed class MergeFilterQuery : CacheOutputQuery { private Query child; public MergeFilterQuery(Query input, Query child) : base(input) { this.child = child; } private MergeFilterQuery(MergeFilterQuery other) : base(other) { this.child = Clone(other.child); } public override void SetXsltContext(XsltContext xsltContext) { base.SetXsltContext(xsltContext); child.SetXsltContext(xsltContext); } public override object Evaluate(XPathNodeIterator nodeIterator) { base.Evaluate(nodeIterator); while (input.Advance() != null) { child.Evaluate(input); XPathNavigator node; while ((node = child.Advance()) != null) { Insert(outputBuffer, node); } } return this; } public override XPathNavigator MatchNode(XPathNavigator current) { XPathNavigator context = child.MatchNode(current); if (context == null) { return null; } context = input.MatchNode(context); if (context == null) { return null; } Evaluate(new XPathSingletonIterator(context.Clone(), /*moved:*/true)); XPathNavigator result = Advance(); while (result != null) { if (result.IsSamePosition(current)) { return context; } result = Advance(); } return null; } public override XPathNodeIterator Clone() { return new MergeFilterQuery(this); } public override void PrintQuery(XmlWriter w) { w.WriteStartElement(this.GetType().Name); input.PrintQuery(w); child.PrintQuery(w); w.WriteEndElement(); } } } // 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
- ToolStripPanelRow.cs
- TableRow.cs
- SafeLibraryHandle.cs
- DefaultAssemblyResolver.cs
- CaseStatement.cs
- altserialization.cs
- VisualBasicSettingsHandler.cs
- EntityCommandExecutionException.cs
- AppDomainFactory.cs
- RangeValueProviderWrapper.cs
- TextServicesHost.cs
- ColorConverter.cs
- ReliableSessionBindingElementImporter.cs
- TdsRecordBufferSetter.cs
- metadatamappinghashervisitor.cs
- HttpServerUtilityBase.cs
- ContentElement.cs
- ConnectionString.cs
- AnimatedTypeHelpers.cs
- MatrixValueSerializer.cs
- PKCS1MaskGenerationMethod.cs
- TcpSocketManager.cs
- OpenCollectionAsyncResult.cs
- documentsequencetextview.cs
- CurrentTimeZone.cs
- FreezableDefaultValueFactory.cs
- DependencyObject.cs
- EastAsianLunisolarCalendar.cs
- XmlDocumentSchema.cs
- DocumentEventArgs.cs
- BufferedMessageWriter.cs
- TreeNodeSelectionProcessor.cs
- SuppressIldasmAttribute.cs
- CaretElement.cs
- ConditionValidator.cs
- TrackingLocation.cs
- ResourceSet.cs
- DbExpressionVisitor_TResultType.cs
- StorageInfo.cs
- CodeMethodInvokeExpression.cs
- unsafeIndexingFilterStream.cs
- UserMapPath.cs
- ParamArrayAttribute.cs
- Module.cs
- Constants.cs
- HtmlButton.cs
- CustomBindingElementCollection.cs
- HttpValueCollection.cs
- HwndSourceKeyboardInputSite.cs
- XPathAncestorQuery.cs
- SqlAggregateChecker.cs
- Socket.cs
- DrawingContextWalker.cs
- WebHeaderCollection.cs
- Visual3D.cs
- TripleDES.cs
- XmlSerializationGeneratedCode.cs
- shaper.cs
- CodeDirectiveCollection.cs
- XmlDesignerDataSourceView.cs
- XpsInterleavingPolicy.cs
- SerializerDescriptor.cs
- TabPanel.cs
- SchemaImporter.cs
- HideDisabledControlAdapter.cs
- ProviderBase.cs
- PageHandlerFactory.cs
- CachedCompositeFamily.cs
- ToolTipService.cs
- NativeMethods.cs
- SpeechAudioFormatInfo.cs
- CapiSafeHandles.cs
- HtmlFormWrapper.cs
- StrongNameMembershipCondition.cs
- AudienceUriMode.cs
- PropertySourceInfo.cs
- PrintPreviewControl.cs
- DataTablePropertyDescriptor.cs
- Char.cs
- StateDesigner.cs
- PageCodeDomTreeGenerator.cs
- RawStylusInputCustomData.cs
- StatusBar.cs
- SafePEFileHandle.cs
- EventSource.cs
- Walker.cs
- IdentitySection.cs
- DbLambda.cs
- ListBindableAttribute.cs
- UIElement.cs
- _AutoWebProxyScriptWrapper.cs
- HuffmanTree.cs
- ResourceDisplayNameAttribute.cs
- ContainsRowNumberChecker.cs
- EntityTransaction.cs
- ObjectListShowCommandsEventArgs.cs
- DataObject.cs
- HttpWebResponse.cs
- FolderBrowserDialog.cs
- MetadataWorkspace.cs