Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- AssemblyName.cs
- SerialStream.cs
- CorrelationQuery.cs
- DispatcherProcessingDisabled.cs
- Lookup.cs
- TitleStyle.cs
- ResourceManagerWrapper.cs
- odbcmetadatacollectionnames.cs
- VerificationException.cs
- DataGridViewColumnDesigner.cs
- DrawingVisualDrawingContext.cs
- CheckBoxList.cs
- ArrangedElementCollection.cs
- XmlSchemaSimpleTypeList.cs
- CursorConverter.cs
- ContainerParagraph.cs
- ElementHostAutomationPeer.cs
- Base64Decoder.cs
- ConstraintCollection.cs
- KeySplineConverter.cs
- EntityModelBuildProvider.cs
- ClientSettings.cs
- BinaryObjectReader.cs
- OdbcStatementHandle.cs
- MarshalByRefObject.cs
- XmlILAnnotation.cs
- HtmlMeta.cs
- HMACSHA256.cs
- ToolboxComponentsCreatingEventArgs.cs
- DispatcherSynchronizationContext.cs
- IPAddress.cs
- Journaling.cs
- LineUtil.cs
- RecognizedPhrase.cs
- PipelineModuleStepContainer.cs
- SelectManyQueryOperator.cs
- ObjectFullSpanRewriter.cs
- EndpointDiscoveryMetadata11.cs
- QilValidationVisitor.cs
- DesignerCategoryAttribute.cs
- TableCell.cs
- isolationinterop.cs
- ReadOnlyDataSourceView.cs
- DynamicMetaObject.cs
- StorageFunctionMapping.cs
- OptimizedTemplateContent.cs
- BaseEntityWrapper.cs
- ColumnReorderedEventArgs.cs
- MarshalByRefObject.cs
- StackBuilderSink.cs
- X500Name.cs
- DesignerTextWriter.cs
- DynamicControlParameter.cs
- RTLAwareMessageBox.cs
- SqlBulkCopyColumnMapping.cs
- ActiveDesignSurfaceEvent.cs
- SqlColumnizer.cs
- DocumentApplicationDocumentViewer.cs
- TemplateDefinition.cs
- Bidi.cs
- SequentialUshortCollection.cs
- TextContainerChangedEventArgs.cs
- PreloadedPackages.cs
- DateTimeParse.cs
- ReadOnlyHierarchicalDataSourceView.cs
- DefaultAssemblyResolver.cs
- Button.cs
- QuaternionAnimation.cs
- _TimerThread.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- sqlinternaltransaction.cs
- XmlAtomErrorReader.cs
- DataGridItem.cs
- XmlUnspecifiedAttribute.cs
- StrokeFIndices.cs
- VisualCollection.cs
- GroupDescription.cs
- MaskInputRejectedEventArgs.cs
- SqlProfileProvider.cs
- ComplexTypeEmitter.cs
- WebBrowsableAttribute.cs
- SystemResources.cs
- EncoderParameter.cs
- Thumb.cs
- DataGridPreparingCellForEditEventArgs.cs
- Accessible.cs
- StringCollection.cs
- ProgramPublisher.cs
- EnvironmentPermission.cs
- SocketElement.cs
- ProviderConnectionPointCollection.cs
- Binding.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- MetadataPropertyvalue.cs
- XamlDesignerSerializationManager.cs
- NamedPermissionSet.cs
- DictionaryItemsCollection.cs
- RadioButton.cs
- IndexedSelectQueryOperator.cs
- DependencyObjectProvider.cs