SyntaxNodeExtensions.WithTriviaFrom<TSyntax> 方法

定义

从此节点创建一个新节点,其中包含指定节点的前导和尾随琐事。

public:
generic <typename TSyntax>
 where TSyntax : Microsoft::CodeAnalysis::SyntaxNode[System::Runtime::CompilerServices::Extension]
 static TSyntax WithTriviaFrom(TSyntax syntax, Microsoft::CodeAnalysis::SyntaxNode ^ node);
public static TSyntax WithTriviaFrom<TSyntax> (this TSyntax syntax, Microsoft.CodeAnalysis.SyntaxNode node) where TSyntax : Microsoft.CodeAnalysis.SyntaxNode;
static member WithTriviaFrom : 'Syntax * Microsoft.CodeAnalysis.SyntaxNode -> 'Syntax (requires 'Syntax :> Microsoft.CodeAnalysis.SyntaxNode)
<Extension()>
Public Function WithTriviaFrom(Of TSyntax As SyntaxNode) (syntax As TSyntax, node As SyntaxNode) As TSyntax

类型参数

TSyntax

参数

syntax
TSyntax
node
SyntaxNode

返回

TSyntax

适用于