Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- MdImport.cs
- TextParaClient.cs
- ConnectionPointCookie.cs
- Serializer.cs
- TextCompositionEventArgs.cs
- InternalSafeNativeMethods.cs
- LinearGradientBrush.cs
- BitmapEffectInput.cs
- DataGridRow.cs
- SafeLibraryHandle.cs
- DataServices.cs
- XmlNavigatorStack.cs
- TagPrefixCollection.cs
- NavigationHelper.cs
- ModelTreeEnumerator.cs
- ControlTemplate.cs
- PowerModeChangedEventArgs.cs
- IODescriptionAttribute.cs
- TableChangeProcessor.cs
- SafeRightsManagementQueryHandle.cs
- WebServiceMethodData.cs
- StylusDownEventArgs.cs
- ReachDocumentReferenceCollectionSerializer.cs
- StaticExtension.cs
- XmlByteStreamWriter.cs
- DataGridItemCollection.cs
- XmlWellformedWriter.cs
- LocalFileSettingsProvider.cs
- TextLine.cs
- HtmlInputHidden.cs
- DeclarationUpdate.cs
- MenuCommand.cs
- PackageProperties.cs
- DocumentSequence.cs
- NameNode.cs
- VectorCollection.cs
- ListViewItem.cs
- RenderCapability.cs
- TemplatePagerField.cs
- CommunicationException.cs
- assemblycache.cs
- HitTestWithGeometryDrawingContextWalker.cs
- StaticDataManager.cs
- IisTraceListener.cs
- SecurityManager.cs
- ScrollProperties.cs
- SurrogateEncoder.cs
- Clause.cs
- SchemaCollectionPreprocessor.cs
- TrackingValidationObjectDictionary.cs
- BrowserCapabilitiesFactory.cs
- DetailsViewModeEventArgs.cs
- TimeSpanSecondsConverter.cs
- ImportContext.cs
- ValidationPropertyAttribute.cs
- BufferedReadStream.cs
- StateDesigner.Layouts.cs
- Byte.cs
- EnlistmentState.cs
- BinaryFormatterSinks.cs
- SecurityUtils.cs
- ConstraintManager.cs
- ProcessHost.cs
- JapaneseLunisolarCalendar.cs
- HttpConfigurationContext.cs
- DataConnectionHelper.cs
- CustomError.cs
- WebPartDisplayModeCancelEventArgs.cs
- ScriptBehaviorDescriptor.cs
- WebPartTransformer.cs
- Timer.cs
- DataColumnMappingCollection.cs
- dsa.cs
- ConfigurationCollectionAttribute.cs
- TextElement.cs
- HeaderPanel.cs
- DefinitionBase.cs
- TypeConverterHelper.cs
- ThemeDirectoryCompiler.cs
- MatrixAnimationBase.cs
- XmlSchemaAttributeGroupRef.cs
- SQLSingleStorage.cs
- Pkcs9Attribute.cs
- TcpServerChannel.cs
- VSWCFServiceContractGenerator.cs
- ValueConversionAttribute.cs
- XamlToRtfParser.cs
- EtwTrace.cs
- SrgsSubset.cs
- GridSplitterAutomationPeer.cs
- VisualStyleInformation.cs
- EntityDataSourceView.cs
- PolyBezierSegment.cs
- RSAProtectedConfigurationProvider.cs
- AstTree.cs
- DockPanel.cs
- Binding.cs
- EventLog.cs
- IdentityModelDictionary.cs
- EditorAttributeInfo.cs