thrownewArgumentException("Invalid test format: both `[|...|]` (selection) and `{|result:...|}` (retrieved node span) selections are required for a test.");
thrownewArgumentException("Invalid test format: both `[|...|]` (selection) and `{|result:...|}` (retrieved node span) selections are required for a test.");
/// This refactoring complements the AddAwait fixer. It allows adding `await` and `await ... .ConfigureAwait(false)` even there is no compiler error to trigger the fixer.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem;
usingSystem.Collections.Immutable;
usingSystem.Linq;
usingSystem.Threading;
usingSystem.Threading.Tasks;
usingMicrosoft.CodeAnalysis.CodeActions;
usingMicrosoft.CodeAnalysis.Shared.Extensions;
usingMicrosoft.CodeAnalysis.Text;
namespaceMicrosoft.CodeAnalysis.CodeRefactorings
{
...
...
@@ -25,13 +29,32 @@ internal static class CodeRefactoringContextExtensions
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
/// - Selection is zero-width and in whitespace that corresponds to a Token whose direct ancestor is of type of type <typeparamref name="TSyntaxNode"/>.
/// - Selection is zero-width and in a header (defined by ISyntaxFacts helpers) of an node of type of type <typeparamref name="TSyntaxNode"/>.
/// - Token whose direct parent of type <typeparamref name="TSyntaxNode"/> is selected.
/// - Wanted node is an expression / argument and curent empty selection is within such syntax node (arbitrarily deep) on its first line.
/// - Whole node of a type <typeparamref name="TSyntaxNode"/> is selected.