Skip to content

Commit

Permalink
Address feedback from Cyrus
Browse files Browse the repository at this point in the history
  • Loading branch information
jcouv committed Mar 5, 2019
1 parent 8d23aed commit 61f9722
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions src/Features/CSharp/Portable/CSharpFeaturesResources.resx
Expand Up @@ -168,9 +168,6 @@
<data name="Declare_as_nullable" xml:space="preserve">
<value>Declare as nullable</value>
</data>
<data name="Use_asynchronous_statement" xml:space="preserve">
<value>Use asynchronous statement</value>
</data>
<data name="Simplify_name_0" xml:space="preserve">
<value>Simplify name '{0}'</value>
</data>
Expand Down
Expand Up @@ -52,14 +52,14 @@ public override async Task RegisterCodeFixesAsync(CodeFixContext context)
var statementToFix = TryGetStatementToFix(node);
if (statementToFix != null)
{
MakeStatementAsynchronous(document, editor, statementToFix);
MakeStatementAsynchronous(editor, statementToFix);
}
}

return Task.CompletedTask;
}

private static void MakeStatementAsynchronous(Document document, SyntaxEditor editor, SyntaxNode statementToFix)
private static void MakeStatementAsynchronous(SyntaxEditor editor, SyntaxNode statementToFix)
{
SyntaxNode newStatement;
switch (statementToFix)
Expand Down Expand Up @@ -109,9 +109,9 @@ private static SyntaxNode TryGetStatementToFix(SyntaxNode node)
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument) :
base(CSharpFeaturesResources.Use_asynchronous_statement,
base(CSharpFeaturesResources.Add_await,
createChangedDocument,
CSharpFeaturesResources.Use_asynchronous_statement)
CSharpFeaturesResources.Add_await)
{
}
}
Expand Down

0 comments on commit 61f9722

Please sign in to comment.