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
- SignatureToken.cs
- Model3D.cs
- LineMetrics.cs
- SequentialOutput.cs
- HttpStreamXmlDictionaryReader.cs
- ReadOnlyObservableCollection.cs
- DefaultMemberAttribute.cs
- _Connection.cs
- MessageSecurityOverTcp.cs
- WebPartVerbCollection.cs
- XmlILStorageConverter.cs
- DependencyObjectPropertyDescriptor.cs
- EditorZone.cs
- BinaryReader.cs
- ObjectAnimationUsingKeyFrames.cs
- WindowsTokenRoleProvider.cs
- UIEndRequest.cs
- wgx_commands.cs
- DetailsViewCommandEventArgs.cs
- DelegatingConfigHost.cs
- ObservableCollection.cs
- MimeTextImporter.cs
- WinFormsSecurity.cs
- DiagnosticsConfiguration.cs
- ModuleConfigurationInfo.cs
- DoubleStorage.cs
- Perspective.cs
- WebSysDefaultValueAttribute.cs
- ProfileProvider.cs
- DeclaredTypeElement.cs
- PackageFilter.cs
- InstanceKey.cs
- StringResourceManager.cs
- EventEntry.cs
- RowType.cs
- ApplicationSettingsBase.cs
- Interlocked.cs
- CloseCryptoHandleRequest.cs
- ZipIOLocalFileDataDescriptor.cs
- IERequestCache.cs
- EdmFunction.cs
- BuildProvidersCompiler.cs
- HtmlInputSubmit.cs
- IIS7UserPrincipal.cs
- NativeMethods.cs
- Processor.cs
- PagePropertiesChangingEventArgs.cs
- BufferedGraphics.cs
- RuleProcessor.cs
- FileStream.cs
- DataTableCollection.cs
- DocumentPage.cs
- PathGeometry.cs
- EmissiveMaterial.cs
- ConstructorArgumentAttribute.cs
- SignatureDescription.cs
- XmlWriterTraceListener.cs
- FusionWrap.cs
- SourceElementsCollection.cs
- TargetException.cs
- ByteStack.cs
- EventBuilder.cs
- ExpandedWrapper.cs
- WrappedOptions.cs
- SqlWebEventProvider.cs
- SHA1.cs
- RawStylusInput.cs
- ToolStripDropDownClosedEventArgs.cs
- AddIn.cs
- MetadataItem.cs
- ProtocolElement.cs
- SecurityUtils.cs
- TemplateManager.cs
- AttributeQuery.cs
- ExpressionEditorAttribute.cs
- ViewManager.cs
- AutomationPropertyInfo.cs
- EntityProviderServices.cs
- PropertyPath.cs
- PathTooLongException.cs
- FixedDSBuilder.cs
- CellTreeNode.cs
- ButtonRenderer.cs
- DeflateStream.cs
- InteropEnvironment.cs
- TextServicesHost.cs
- XmlBinaryWriter.cs
- TextPattern.cs
- EntityDesignerBuildProvider.cs
- SHA384Managed.cs
- JavaScriptString.cs
- PartialCachingAttribute.cs
- EntryWrittenEventArgs.cs
- CachedFontFamily.cs
- CrossSiteScriptingValidation.cs
- SystemEvents.cs
- RelatedCurrencyManager.cs
- DataSourceSelectArguments.cs
- WebZone.cs
- OperandQuery.cs