diff --git a/eng/Signing.props b/eng/Signing.props index 2a17aa85072c33f709529fca06cc66d696797200..24f1f0df6cb1a3950501c0603f02a4363cd7e8bd 100644 --- a/eng/Signing.props +++ b/eng/Signing.props @@ -16,10 +16,10 @@ - - - - + + + + diff --git a/src/EditorFeatures/CSharpTest/RefactoringHelpers/RefactoringHelpersTests.cs b/src/EditorFeatures/CSharpTest/RefactoringHelpers/RefactoringHelpersTests.cs index ff45618722bbc9975e3baf410bedc116649f8f8e..bbe8da9f993e551fbb1cdebd03e54c7c7ef89163 100644 --- a/src/EditorFeatures/CSharpTest/RefactoringHelpers/RefactoringHelpersTests.cs +++ b/src/EditorFeatures/CSharpTest/RefactoringHelpers/RefactoringHelpersTests.cs @@ -753,7 +753,6 @@ class Test2Attribute : Attribute { } }"; await TestAsync(testText); } - #endregion #region Extractions general @@ -1014,7 +1013,6 @@ C LocalFunction(C c) }"; await TestMissingAsync(testText); } - #endregion #region Test predicate @@ -1511,7 +1509,6 @@ int N(int a) }"; await TestAsync(testText, predicate: n => n.Parent is TupleExpressionSyntax); } - #endregion } } diff --git a/src/Features/Core/Portable/CodeRefactorings/AbstractRefactoringHelpersService.cs b/src/Features/Core/Portable/CodeRefactorings/AbstractRefactoringHelpersService.cs index b23d1557499dd79ae715e0acfcbafbc3b6785f01..a63016862cd6f9f3d18a41fe314b1fd8dbc0c183 100644 --- a/src/Features/Core/Portable/CodeRefactorings/AbstractRefactoringHelpersService.cs +++ b/src/Features/Core/Portable/CodeRefactorings/AbstractRefactoringHelpersService.cs @@ -51,12 +51,11 @@ internal abstract class AbstractRefactoringHelpersService()) { + // Reason to treat Arguments (and potentially others) as Expression-like: + // https://github.com/dotnet/roslyn/pull/37295#issuecomment-516145904 await AddNodesDeepIn(document, location, relevantNodesBuilder, cancellationToken).ConfigureAwait(false); } } @@ -464,6 +465,7 @@ private static TextSpan GetSpanWithoutAttributes(SyntaxNode node, SyntaxNode roo // //Comment1 // [||]object Property1 { get; set; } // the comment node being part of the next token's (`object`) leading trivia and not the AttributeList's node. + // - In case only attribute is written we need to be careful to not to use next (unrelated) token as beginning current the node. var attributeList = syntaxFacts.GetAttributeLists(node); if (attributeList.Any()) { diff --git a/src/Features/Core/Portable/CodeRefactorings/IRefactoringHelpersService.cs b/src/Features/Core/Portable/CodeRefactorings/IRefactoringHelpersService.cs index daa6564090350102935b70e1feccb3a98c0d80db..f80dc3a3d7ff871ce408a363563ac2a7c3cfafe5 100644 --- a/src/Features/Core/Portable/CodeRefactorings/IRefactoringHelpersService.cs +++ b/src/Features/Core/Portable/CodeRefactorings/IRefactoringHelpersService.cs @@ -22,7 +22,7 @@ internal interface IRefactoringHelpersService : ILanguageService /// - Selection is zero-width and in whitespace that corresponds to a Token whose direct ancestor is of type of type . /// - Selection is zero-width and in a header (defined by ISyntaxFacts helpers) of an node of type of type . /// - Token whose direct parent of type is selected. - /// - Wanted node is an expression / argument and curent empty selection is within such syntax node (arbitrarily deep) on its first line. + /// - Selection is zero-width and wanted node is an expression / argument with selection within such syntax node (arbitrarily deep) on its first line. /// - Whole node of a type is selected. /// ///