5 types derived from XNode
System.Private.Xml.Linq (5)
364 references to XNode
ConfigurationSchemaGenerator (1)
ConfigurationSchemaGenerator.Tests (1)
Microsoft.AspNetCore.DataProtection.Tests (9)
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (3)
Microsoft.AspNetCore.Mvc.FunctionalTests (3)
Microsoft.Build.Tasks.Core (1)
Microsoft.CodeAnalysis (3)
Microsoft.CodeAnalysis.CSharp (22)
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (22)
125foreach (XNode node in expander.Rewrite(doc, currentXmlFilePath: null, originatingSyntax: null))
147private XNode[] RewriteMany(XNode[] nodes, string currentXmlFilePath, CSharpSyntaxNode originatingSyntax)
151ArrayBuilder<XNode> builder = null;
152foreach (XNode child in nodes)
156builder = ArrayBuilder<XNode>.GetInstance();
167return builder == null ? Array.Empty<XNode>() : builder.ToArrayAndFree();
171private XNode[] Rewrite(XNode node, string currentXmlFilePath, CSharpSyntaxNode originatingSyntax)
182XNode[] rewritten = RewriteIncludeElement(element, currentXmlFilePath, originatingSyntax, out commentMessage);
194return new XNode[] { node.Copy(copyAttributeAnnotations: false) };
197IEnumerable<XNode> oldNodes = container.Nodes();
206XNode[] rewritten = RewriteMany(oldNodes.ToArray(), currentXmlFilePath, originatingSyntax);
243return new XNode[] { container }; // Already copied.
248return new XNode[] { failureComment, container }; // Already copied.
266private XNode[] RewriteIncludeElement(XElement includeElement, string currentXmlFilePath, CSharpSyntaxNode originatingSyntax, out string commentMessage)
289return new XNode[] { new XComment(commentMessage), includeElement.Copy(copyAttributeAnnotations: false) };
370return new XNode[] { new XComment(commentMessage) };
375return Array.Empty<XNode>();
382XNode[] result = RewriteMany(loadedElements, resolvedFilePath, originatingSyntax);
412return new XNode[] { new XComment(commentMessage) };
417return Array.Empty<XNode>();
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
Microsoft.CodeAnalysis.Features (2)
Microsoft.CodeAnalysis.VisualBasic (23)
Compilation\DocumentationComments\DocumentationCommentCompiler.Includes.vb (23)
248Private Function RewriteMany(nodes As XNode(), currentXmlFilePath As String, originatingSyntax As XmlNodeSyntax) As XNode()
251Dim builder As ArrayBuilder(Of XNode) = Nothing
254builder = ArrayBuilder(Of XNode).GetInstance()
264Return If(builder Is Nothing, Array.Empty(Of XNode)(), builder.ToArrayAndFree())
267Private Function Rewrite(node As XNode, currentXmlFilePath As String, originatingSyntax As XmlNodeSyntax) As XNode()
275Dim rewritten As XNode() = RewriteIncludeElement(element, currentXmlFilePath, originatingSyntax, commentMessage)
285Return New XNode() {node.Copy(copyAttributeAnnotations:=True)}
288Dim oldNodes As IEnumerable(Of XNode) = container.Nodes
296Dim rewritten As XNode() = RewriteMany(oldNodes.ToArray(), currentXmlFilePath, originatingSyntax)
425Return New XNode() {container}
427Return New XNode() {New XComment(commentMessage), container}
441Private Function RewriteIncludeElement(includeElement As XElement, currentXmlFilePath As String, originatingSyntax As XmlNodeSyntax, <Out> ByRef commentMessage As String) As XNode()
454Return New XNode() {New XComment(commentMessage)}
475Return New XNode() {New XComment(commentMessage)}
484Return New XNode() {New XComment(commentMessage)}
490Return New XNode() {New XComment(commentMessage)}
504Return New XNode() {New XComment(commentMessage)}
515Return New XNode() {New XComment(commentMessage)}
520Dim result As XNode() = RewriteMany(loadedElements, resolvedFilePath, originatingSyntax)
535Return New XNode() {New XComment(commentMessage)}
539Return New XNode() {New XComment(commentMessage)}
Microsoft.CodeAnalysis.Workspaces (12)
Shared\Extensions\ISymbolExtensions.cs (12)
297private static XNode[] RewriteInheritdocElements(ISymbol symbol, HashSet<ISymbol>? visitedSymbols, Compilation compilation, XNode node, CancellationToken cancellationToken)
334private static XNode[] RewriteMany(ISymbol symbol, HashSet<ISymbol>? visitedSymbols, Compilation compilation, XNode[] nodes, CancellationToken cancellationToken)
336var result = new List<XNode>();
337foreach (var child in nodes)
345private static XNode[]? RewriteInheritdocElement(ISymbol memberSymbol, HashSet<ISymbol>? visitedSymbols, Compilation compilation, XElement element, CancellationToken cancellationToken)
564where TNode : XNode
566XNode copy;
615private static XNode[]? TrySelectNodes(XNode node, string xpath)
622return xpathResult?.Cast<XNode>().ToArray();
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Microsoft.DotNet.VersionTools (1)
Microsoft.DotNet.VersionTools.Tests (6)
netstandard (1)
System.Private.Xml.Linq (266)
System\Xml\XPath\XNodeNavigator.cs (41)
51public XNodeNavigator(XNode node, XmlNameTable? nameTable)
106foreach (XNode node in container.Nodes())
370foreach (XNode node in c.Nodes())
404foreach (XNode node in container.Nodes())
493XNode? currentNode = _source as XNode;
499XNode? next;
500for (XNode node = currentNode; node != null; node = next)
520XNode? currentNode = _source as XNode;
538XNode? currentNode = _source as XNode;
549XNode? next;
550for (XNode node = currentNode; ; node = next)
641XNode? parentNode = _source.GetParent();
652XNode? currentNode = _source as XNode;
658XNode? previous = null;
659foreach (XNode node in container.Nodes())
729foreach (XNode node in n.NodesAfterSelf())
748private static bool IsContent(XContainer c, XNode n)
866public static object Evaluate<T>(XNode node, string expression, IXmlNamespaceResolver? resolver) where T : class
907/// Creates an <see cref="XPathNavigator"/> for a given <see cref="XNode"/>
909/// <param name="node">Extension point <see cref="XNode"/></param>
911public static XPathNavigator CreateNavigator(this XNode node)
917/// Creates an <see cref="XPathNavigator"/> for a given <see cref="XNode"/>
919/// <param name="node">Extension point <see cref="XNode"/></param>
923public static XPathNavigator CreateNavigator(this XNode node, XmlNameTable? nameTable)
940/// <param name="node">Extension point <see cref="XNode"/></param>
944public static object XPathEvaluate(this XNode node, string expression)
952/// <param name="node">Extension point <see cref="XNode"/></param>
958public static object XPathEvaluate(this XNode node, string expression, IXmlNamespaceResolver? resolver)
968/// <param name="node">Extension point <see cref="XNode"/></param>
971public static XElement? XPathSelectElement(this XNode node, string expression)
979/// <param name="node">Extension point <see cref="XNode"/></param>
984public static XElement? XPathSelectElement(this XNode node, string expression, IXmlNamespaceResolver? resolver)
992/// <param name="node">Extension point <see cref="XNode"/></param>
995public static IEnumerable<XElement> XPathSelectElements(this XNode node, string expression)
1003/// <param name="node">Extension point <see cref="XNode"/></param>
1008public static IEnumerable<XElement> XPathSelectElements(this XNode node, string expression, IXmlNamespaceResolver? resolver)
1022foreach (XNode node in parentNode.Nodes())
System.Xml.Linq (1)
System.Xml.XDocument (1)
System.Xml.XPath.XDocument (3)