Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / Xml / System / Xml / XPath / Internal / MergeFilterQuery.cs / 1 / 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. //------------------------------------------------------------------------------ //// 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
- XmlElement.cs
- XmlCDATASection.cs
- SafeFindHandle.cs
- NavigationPropertyEmitter.cs
- StateMachineWorkflow.cs
- HttpEncoderUtility.cs
- ApplicationFileParser.cs
- WebPartZoneBaseDesigner.cs
- BackStopAuthenticationModule.cs
- PrimitiveXmlSerializers.cs
- FixedDocumentPaginator.cs
- Util.cs
- EventLogPermissionEntryCollection.cs
- FrameworkTemplate.cs
- HwndKeyboardInputProvider.cs
- SecurityVersion.cs
- DataRowCollection.cs
- Vertex.cs
- HttpProfileGroupBase.cs
- Control.cs
- ConfigXmlReader.cs
- ResourceContainer.cs
- PlainXmlDeserializer.cs
- Queue.cs
- DoubleAnimationClockResource.cs
- StateMachineTimers.cs
- SafeNativeMethods.cs
- CssStyleCollection.cs
- SchemaInfo.cs
- UpDownEvent.cs
- ImageIndexConverter.cs
- TypeHelpers.cs
- XmlSchemaComplexContent.cs
- AttachedAnnotation.cs
- NullableDecimalAverageAggregationOperator.cs
- MaterialGroup.cs
- CheckBoxRenderer.cs
- PingReply.cs
- RolePrincipal.cs
- TemplateXamlParser.cs
- FixedSOMPageElement.cs
- GridViewPageEventArgs.cs
- MergeFailedEvent.cs
- DateTimeConstantAttribute.cs
- UIPermission.cs
- XamlReaderConstants.cs
- XmlAtomicValue.cs
- InputLanguageCollection.cs
- ScalarConstant.cs
- ToolStripGrip.cs
- CalloutQueueItem.cs
- MSG.cs
- JsonServiceDocumentSerializer.cs
- SemaphoreFullException.cs
- BuildTopDownAttribute.cs
- ImportedNamespaceContextItem.cs
- PackageDigitalSignature.cs
- ImageList.cs
- DataGridCommandEventArgs.cs
- WpfKnownType.cs
- securitycriticaldataformultiplegetandset.cs
- SapiRecognizer.cs
- SoapReflectionImporter.cs
- WindowsSlider.cs
- WebPermission.cs
- AppDomainProtocolHandler.cs
- GradientBrush.cs
- TraceHandlerErrorFormatter.cs
- RenderDataDrawingContext.cs
- WebPartConnectionsConnectVerb.cs
- ListViewGroupItemCollection.cs
- HttpAsyncResult.cs
- ChannelServices.cs
- BindingMAnagerBase.cs
- DataGridCellsPanel.cs
- SmiEventSink_Default.cs
- OleDbFactory.cs
- ValueTable.cs
- TypeElement.cs
- TreeNodeCollection.cs
- DataFormats.cs
- FormatException.cs
- ModuleBuilderData.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- ClassicBorderDecorator.cs
- PagesSection.cs
- DecimalStorage.cs
- Debugger.cs
- SqlGatherConsumedAliases.cs
- XmlMtomReader.cs
- ComPlusInstanceProvider.cs
- WeakEventTable.cs
- NativeMethods.cs
- GridViewSelectEventArgs.cs
- _ContextAwareResult.cs
- ThemeConfigurationDialog.cs
- ClientProxyGenerator.cs
- SemanticValue.cs
- SourceElementsCollection.cs
- ControlPaint.cs