提交 705f8c66 编写于 作者: S Sam Harwell

Add documentation for TryUpdateParentOfUpdatedNode

上级 489ece20
......@@ -69,7 +69,7 @@ protected override SyntaxNode TryUpdateNameForFlaggedNode(SyntaxNode node, Synta
}
}
protected override SyntaxNode TryUpdateParentOfUpdatedNode(SyntaxNode parent, SyntaxNode newNameNode, SyntaxEditor editor, ISyntaxFactsService syntaxFacts)
protected override SyntaxNode TryUpdateParentOfUpdatedNode(SyntaxNode parent, SyntaxNode newNameNode, SyntaxEditor editor, ISyntaxFacts syntaxFacts)
{
if (newNameNode.IsKind(SyntaxKind.DiscardDesignation)
&& parent.IsKind(SyntaxKind.DeclarationPattern, out DeclarationPatternSyntax declarationPattern)
......
......@@ -103,7 +103,16 @@ internal abstract class AbstractRemoveUnusedValuesCodeFixProvider<TExpressionSyn
SyntaxEditor editor,
ISyntaxFactsService syntaxFacts);
protected virtual SyntaxNode TryUpdateParentOfUpdatedNode(SyntaxNode parent, SyntaxNode newNameNode, SyntaxEditor editor, ISyntaxFactsService syntaxFacts)
/// <summary>
/// Rewrite the parent of a node which was rewritted by <see cref="TryUpdateNameForFlaggedNode"/>.
/// </summary>
/// <param name="parent">The original parent of the node rewritten by <see cref="TryUpdateNameForFlaggedNode"/>.</param>
/// <param name="newNameNode">The rewritten node produced by <see cref="TryUpdateNameForFlaggedNode"/>.</param>
/// <param name="editor">The syntax editor for the code fix.</param>
/// <param name="syntaxFacts">The syntax facts for the current language.</param>
/// <returns>The replacement node to use in the rewritten syntax tree; otherwise, <see langword="null"/> to only
/// rewrite the node originally rewritten by <see cref="TryUpdateNameForFlaggedNode"/>.</returns>
protected virtual SyntaxNode TryUpdateParentOfUpdatedNode(SyntaxNode parent, SyntaxNode newNameNode, SyntaxEditor editor, ISyntaxFacts syntaxFacts)
{
return null;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册