共用方式為


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

適用於