SyntaxNodeExtensions.RemoveNode<TRoot> Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Crée une arborescence de nœuds avec le nœud spécifié supprimé.
public:
generic <typename TRoot>
where TRoot : Microsoft::CodeAnalysis::SyntaxNode[System::Runtime::CompilerServices::Extension]
static TRoot RemoveNode(TRoot root, Microsoft::CodeAnalysis::SyntaxNode ^ node, Microsoft::CodeAnalysis::SyntaxRemoveOptions options);
public static TRoot RemoveNode<TRoot>(this TRoot root, Microsoft.CodeAnalysis.SyntaxNode node, Microsoft.CodeAnalysis.SyntaxRemoveOptions options) where TRoot : Microsoft.CodeAnalysis.SyntaxNode;
public static TRoot? RemoveNode<TRoot>(this TRoot root, Microsoft.CodeAnalysis.SyntaxNode node, Microsoft.CodeAnalysis.SyntaxRemoveOptions options) where TRoot : Microsoft.CodeAnalysis.SyntaxNode;
static member RemoveNode : 'Root * Microsoft.CodeAnalysis.SyntaxNode * Microsoft.CodeAnalysis.SyntaxRemoveOptions -> 'Root (requires 'Root :> Microsoft.CodeAnalysis.SyntaxNode)
<Extension()>
Public Function RemoveNode(Of TRoot As SyntaxNode) (root As TRoot, node As SyntaxNode, options As SyntaxRemoveOptions) As TRoot
Paramètres de type
- TRoot
Type du nœud racine.
Paramètres
- root
- TRoot
Nœud racine à partir duquel supprimer un nœud descendant.
- node
- SyntaxNode
Nœud à supprimer.
- options
- SyntaxRemoveOptions
Options qui déterminent la façon dont la trivia du nœud est traitée.
Retours
Nouvelle racine ou null si le nœud racine lui-même est supprimé.