提交 a5ec068b 编写于 作者: M Martin Strecker

Changes requested by code review.

上级 70d2add8
......@@ -9,10 +9,10 @@
namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.Diagnostics.ConditionalExpressionInStringInterpolation
{
public class CSharpAddParenthesisAroundConditionalExpressionInInterpolatedStringCodeFixProviderTests : AbstractCSharpDiagnosticProviderBasedUserDiagnosticTest
public class CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProviderTests : AbstractCSharpDiagnosticProviderBasedUserDiagnosticTest
{
internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
=> (null, new CSharpAddParenthesisAroundConditionalExpressionInInterpolatedStringCodeFixProvider());
=> (null, new CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider());
private async Task TestInMethodAsync(string initialMethodBody, string expectedMethodBody)
{
......@@ -29,7 +29,7 @@ public static M()
string.Format(template, expectedMethodBody)).ConfigureAwait(false);
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisSimpleConditionalExpression()
{
await TestInMethodAsync(
......@@ -37,7 +37,7 @@ public async Task TestAddParenthesisSimpleConditionalExpression()
@"var s = $""{ (true ? 1 : 2)}"";");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisMultiLineConditionalExpression1()
{
await TestInMethodAsync(@"
......@@ -51,7 +51,7 @@ public async Task TestAddParenthesisMultiLineConditionalExpression1()
");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisMultiLineConditionalExpression2()
{
await TestInMethodAsync(@"
......@@ -73,7 +73,7 @@ public async Task TestAddParenthesisMultiLineConditionalExpression2()
");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisWithTrivia()
{
await TestInMethodAsync(
......@@ -81,7 +81,7 @@ public async Task TestAddParenthesisWithTrivia()
@"var s = $""{ /* Leading1 */ (true /* Leading2 */ ? /* TruePart1 */ 1 /* TruePart2 */: /* FalsePart1 */ 2 /* FalsePart2 */ )}"";");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisClosingBracketInFalseCondition()
{
await TestInMethodAsync(
......@@ -89,7 +89,7 @@ public async Task TestAddParenthesisClosingBracketInFalseCondition()
@"var s = $""{ (true ? new int[0] : new int[] {})}"";");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisStringLiteralInFalseCondition()
{
await TestInMethodAsync(
......@@ -97,7 +97,7 @@ public async Task TestAddParenthesisStringLiteralInFalseCondition()
@"var s = $""{ (true ? ""1"" : ""2"")}"";");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisVerbatimStringLiteralInFalseCondition()
{
await TestInMethodAsync(
......@@ -105,7 +105,7 @@ public async Task TestAddParenthesisVerbatimStringLiteralInFalseCondition()
@"var s = $""{ (true ? ""1"" : @""""""2"""""")}"";");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisStringLiteralInFalseConditionWithClosingParenthesisInLiteral()
{
await TestInMethodAsync(
......@@ -113,7 +113,7 @@ public async Task TestAddParenthesisStringLiteralInFalseConditionWithClosingPare
@"var s = $""{ (true ? ""1"" : ""2)"")}"";");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisStringLiteralInFalseConditionWithEscapedDoubleQuotes()
{
await TestInMethodAsync(
......@@ -121,7 +121,7 @@ public async Task TestAddParenthesisStringLiteralInFalseConditionWithEscapedDoub
@"var s = $""{ (true ? ""1"" : ""2\"""")}"";");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisStringLiteralInFalseConditionWithCodeLikeContent()
{
await TestInMethodAsync(
......@@ -129,7 +129,7 @@ public async Task TestAddParenthesisStringLiteralInFalseConditionWithCodeLikeCon
@"var s = $""{ (true ? ""1"" : ""M(new int[] {}, \""Parameter\"");"")}"";");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisNestedConditionalExpression1()
{
await TestInMethodAsync(
......@@ -137,7 +137,7 @@ public async Task TestAddParenthesisNestedConditionalExpression1()
@"var s2 = $""{ (true ? ""1"" : (false ? ""2"" : ""3""))};");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisNestedConditionalExpression2()
{
await TestInMethodAsync(
......@@ -145,7 +145,7 @@ public async Task TestAddParenthesisNestedConditionalExpression2()
@"var s2 = $""{ (true ? ""1"" : false ? ""2"" : ""3"")};");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisNestedConditionalWithNestedInterpolatedString()
{
await TestInMethodAsync(
......@@ -153,7 +153,7 @@ public async Task TestAddParenthesisNestedConditionalWithNestedInterpolatedStrin
@"var s2 = $""{ (true ? ""1"" : false ? $""{ (true ? ""2"" : ""3"")}"" : ""4"") }""");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisMultipleInterpolatedSections1()
{
await TestInMethodAsync(
......@@ -161,7 +161,7 @@ public async Task TestAddParenthesisMultipleInterpolatedSections1()
@"var s3 = $""Text1 { (true ? ""Text2"" : ""Text3"")} Text4 { (true ? ""Text5"" : ""Text6"")} Text7"";");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisMultipleInterpolatedSections2()
{
await TestInMethodAsync(
......@@ -169,7 +169,7 @@ public async Task TestAddParenthesisMultipleInterpolatedSections2()
@"var s3 = $""Text1 { (true ? ""Text2"" : ""Text3"")} Text4 { (true ? ""Text5"" : ""Text6"")} Text7"";");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisMultipleInterpolatedSections3()
{
await TestInMethodAsync(
......@@ -177,7 +177,7 @@ public async Task TestAddParenthesisMultipleInterpolatedSections3()
@"var s3 = $""Text1 { (true ? ""Text2"" : ""Text3"")} Text4 { true ? ""Text5"" : ""Text6""} Text7"";");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisWhileTyping1()
{
await TestInMethodAsync(
......@@ -191,7 +191,7 @@ public async Task TestAddParenthesisWhileTyping1()
NextLineOfCode();");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisWhileTyping2()
{
await TestInMethodAsync(
......@@ -205,7 +205,7 @@ public async Task TestAddParenthesisWhileTyping2()
NextLineOfCode();");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisWhileTyping3()
{
await TestInMethodAsync(
......@@ -219,7 +219,7 @@ public async Task TestAddParenthesisWhileTyping3()
NextLineOfCode();");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisWhileTyping4()
{
await TestInMethodAsync(
......@@ -233,7 +233,7 @@ public async Task TestAddParenthesisWhileTyping4()
NextLineOfCode();");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisWhileTyping5()
{
await TestInMethodAsync(
......@@ -247,7 +247,7 @@ public async Task TestAddParenthesisWhileTyping5()
NextLineOfCode();");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisWithCS1026PresentBeforeFixIsApplied1()
{
await TestInMethodAsync(
......@@ -261,7 +261,7 @@ public async Task TestAddParenthesisWithCS1026PresentBeforeFixIsApplied1()
NextLineOfCode();");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisWithCS1026PresentBeforeFixIsApplied2()
{
await TestInMethodAsync(
......@@ -275,7 +275,7 @@ public async Task TestAddParenthesisWithCS1026PresentBeforeFixIsApplied2()
NextLineOfCode(");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisWithCS1026PresentBeforeFixIsApplied3()
{
await TestInMethodAsync(
......@@ -289,7 +289,7 @@ public async Task TestAddParenthesisWithCS1026PresentBeforeFixIsApplied3()
NextLineOfCode();");
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)]
public async Task TestAddParenthesisAddOpeningParenthesisOnly()
{
await TestInMethodAsync(
......
......@@ -40,7 +40,7 @@ public static class Features
public const string CodeActionsAddNew = "CodeActions.AddNew";
public const string CodeActionsAddOverload = "CodeActions.AddOverloads";
public const string CodeActionsAddParameter = "CodeActions.AddParameter";
public const string CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString = "CodeActions.CodeActionsAddParenthesisAroundConditionalExpressionInInterpolatedString";
public const string CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString = "CodeActions.AddParenthesesAroundConditionalExpressionInInterpolatedString";
public const string CodeActionsChangeToAsync = "CodeActions.ChangeToAsync";
public const string CodeActionsChangeToIEnumerable = "CodeActions.ChangeToIEnumerable";
public const string CodeActionsChangeToYield = "CodeActions.ChangeToYield";
......
......@@ -71,20 +71,20 @@ internal class CSharpFeaturesResources {
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Add &apos;this.&apos; ähnelt.
/// Sucht eine lokalisierte Zeichenfolge, die Add parentheses ähnelt.
/// </summary>
internal static string Add_this {
internal static string Add_parentheses_around_conditional_expression_in_interpolated_string {
get {
return ResourceManager.GetString("Add_this", resourceCulture);
return ResourceManager.GetString("Add_parentheses_around_conditional_expression_in_interpolated_string", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Add parenthesis ähnelt.
/// Sucht eine lokalisierte Zeichenfolge, die Add &apos;this.&apos; ähnelt.
/// </summary>
internal static string AddParenthesisAroundConditionalExpressionInInterpolatedString {
internal static string Add_this {
get {
return ResourceManager.GetString("AddParenthesisAroundConditionalExpressionInInterpolatedString", resourceCulture);
return ResourceManager.GetString("Add_this", resourceCulture);
}
}
......
......@@ -524,7 +524,7 @@
<data name="Use_is_null_check" xml:space="preserve">
<value>Use 'is null' check</value>
</data>
<data name="AddParenthesisAroundConditionalExpressionInInterpolatedString" xml:space="preserve">
<value>Add parenthesis</value>
<data name="Add_parentheses_around_conditional_expression_in_interpolated_string" xml:space="preserve">
<value>Add parentheses</value>
</data>
</root>
\ No newline at end of file
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Immutable;
using System.Composition;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.CodeActions;
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Shared.Extensions;
using Microsoft.CodeAnalysis.Text;
namespace Microsoft.CodeAnalysis.CSharp.CodeFixes.ConditionalExpressionInStringInterpolation
{
internal partial class CSharpAddParenthesisAroundConditionalExpressionInInterpolatedStringCodeFixProvider
[ExportCodeFixProvider(LanguageNames.CSharp, Name = PredefinedCodeFixProviderNames.AddParenthesesAroundConditionalExpressionInInterpolatedString), Shared]
internal partial class CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider : CodeFixProvider
{
private const string CS8361 = nameof(CS8361); //A conditional expression cannot be used directly in a string interpolation because the ':' ends the interpolation.Parenthesize the conditional expression.
public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(CS8361);
public sealed override async Task RegisterCodeFixesAsync(CodeFixContext context)
{
var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
var diagnostic = context.Diagnostics.First();
var diagnosticSpan = diagnostic.Location.SourceSpan;
var token = root.FindToken(diagnosticSpan.Start);
var conditionalExpression = token.GetAncestor<ConditionalExpressionSyntax>();
if (conditionalExpression != null)
{
var documentChangeAction = new MyCodeAction(
cancellationToken => GetChangedDocumentAsync(context.Document, conditionalExpression.SpanStart, cancellationToken));
context.RegisterCodeFix(documentChangeAction, diagnostic);
}
}
private static async Task<Document> GetChangedDocumentAsync(Document document, int conditionalExpressionSyntaxStartPosition, CancellationToken cancellationToken)
{
......@@ -39,5 +65,16 @@ private static async Task<Document> GetChangedDocumentAsync(Document document, i
return documentWithOpenParenthesis;
}
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument)
: base(
CSharpFeaturesResources.Add_parentheses_around_conditional_expression_in_interpolated_string,
createChangedDocument,
CSharpFeaturesResources.Add_parentheses_around_conditional_expression_in_interpolated_string)
{
}
}
}
}
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Immutable;
using System.Composition;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.CodeActions;
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Shared.Extensions;
namespace Microsoft.CodeAnalysis.CSharp.CodeFixes.ConditionalExpressionInStringInterpolation
{
[ExportCodeFixProvider(LanguageNames.CSharp, Name = PredefinedCodeFixProviderNames.AddParenthesisAroundConditionalExpressionInInterpolatedString), Shared]
internal partial class CSharpAddParenthesisAroundConditionalExpressionInInterpolatedStringCodeFixProvider : CodeFixProvider
{
private const string CS8361 = nameof(CS8361); //A conditional expression cannot be used directly in a string interpolation because the ':' ends the interpolation.Parenthesize the conditional expression.
public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(CS8361);
public sealed override async Task RegisterCodeFixesAsync(CodeFixContext context)
{
var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
var diagnostic = context.Diagnostics.First();
var diagnosticSpan = diagnostic.Location.SourceSpan;
var token = root.FindToken(diagnosticSpan.Start);
var conditionalExpression = token.GetAncestor<ConditionalExpressionSyntax>();
if (conditionalExpression != null)
{
var documentChangeAction = new CodeAction.DocumentChangeAction(
CSharpFeaturesResources.AddParenthesisAroundConditionalExpressionInInterpolatedString,
cancellationToken => GetChangedDocumentAsync(context.Document, conditionalExpression.SpanStart, cancellationToken));
context.RegisterCodeFix(documentChangeAction, diagnostic);
}
}
}
}
......@@ -637,9 +637,9 @@
<target state="new">Use 'is null' check</target>
<note />
</trans-unit>
<trans-unit id="AddParenthesisAroundConditionalExpressionInInterpolatedString">
<source>Add parenthesis</source>
<target state="new">Add parenthesis</target>
<trans-unit id="Add_parentheses_around_conditional_expression_in_interpolated_string">
<source>Add parentheses</source>
<target state="new">Add parentheses</target>
<note />
</trans-unit>
</body>
......
......@@ -637,9 +637,9 @@
<target state="new">Use 'is null' check</target>
<note />
</trans-unit>
<trans-unit id="AddParenthesisAroundConditionalExpressionInInterpolatedString">
<source>Add parenthesis</source>
<target state="new">Add parenthesis</target>
<trans-unit id="Add_parentheses_around_conditional_expression_in_interpolated_string">
<source>Add parentheses</source>
<target state="new">Add parentheses</target>
<note />
</trans-unit>
</body>
......
......@@ -637,9 +637,9 @@
<target state="new">Use 'is null' check</target>
<note />
</trans-unit>
<trans-unit id="AddParenthesisAroundConditionalExpressionInInterpolatedString">
<source>Add parenthesis</source>
<target state="new">Add parenthesis</target>
<trans-unit id="Add_parentheses_around_conditional_expression_in_interpolated_string">
<source>Add parentheses</source>
<target state="new">Add parentheses</target>
<note />
</trans-unit>
</body>
......
......@@ -637,9 +637,9 @@
<target state="new">Use 'is null' check</target>
<note />
</trans-unit>
<trans-unit id="AddParenthesisAroundConditionalExpressionInInterpolatedString">
<source>Add parenthesis</source>
<target state="new">Add parenthesis</target>
<trans-unit id="Add_parentheses_around_conditional_expression_in_interpolated_string">
<source>Add parentheses</source>
<target state="new">Add parentheses</target>
<note />
</trans-unit>
</body>
......
......@@ -637,9 +637,9 @@
<target state="new">Use 'is null' check</target>
<note />
</trans-unit>
<trans-unit id="AddParenthesisAroundConditionalExpressionInInterpolatedString">
<source>Add parenthesis</source>
<target state="new">Add parenthesis</target>
<trans-unit id="Add_parentheses_around_conditional_expression_in_interpolated_string">
<source>Add parentheses</source>
<target state="new">Add parentheses</target>
<note />
</trans-unit>
</body>
......
......@@ -637,9 +637,9 @@
<target state="new">Use 'is null' check</target>
<note />
</trans-unit>
<trans-unit id="AddParenthesisAroundConditionalExpressionInInterpolatedString">
<source>Add parenthesis</source>
<target state="new">Add parenthesis</target>
<trans-unit id="Add_parentheses_around_conditional_expression_in_interpolated_string">
<source>Add parentheses</source>
<target state="new">Add parentheses</target>
<note />
</trans-unit>
</body>
......
......@@ -637,9 +637,9 @@
<target state="new">Use 'is null' check</target>
<note />
</trans-unit>
<trans-unit id="AddParenthesisAroundConditionalExpressionInInterpolatedString">
<source>Add parenthesis</source>
<target state="new">Add parenthesis</target>
<trans-unit id="Add_parentheses_around_conditional_expression_in_interpolated_string">
<source>Add parentheses</source>
<target state="new">Add parentheses</target>
<note />
</trans-unit>
</body>
......
......@@ -637,9 +637,9 @@
<target state="new">Use 'is null' check</target>
<note />
</trans-unit>
<trans-unit id="AddParenthesisAroundConditionalExpressionInInterpolatedString">
<source>Add parenthesis</source>
<target state="new">Add parenthesis</target>
<trans-unit id="Add_parentheses_around_conditional_expression_in_interpolated_string">
<source>Add parentheses</source>
<target state="new">Add parentheses</target>
<note />
</trans-unit>
</body>
......
......@@ -637,9 +637,9 @@
<target state="new">Use 'is null' check</target>
<note />
</trans-unit>
<trans-unit id="AddParenthesisAroundConditionalExpressionInInterpolatedString">
<source>Add parenthesis</source>
<target state="new">Add parenthesis</target>
<trans-unit id="Add_parentheses_around_conditional_expression_in_interpolated_string">
<source>Add parentheses</source>
<target state="new">Add parentheses</target>
<note />
</trans-unit>
</body>
......
......@@ -637,9 +637,9 @@
<target state="new">Use 'is null' check</target>
<note />
</trans-unit>
<trans-unit id="AddParenthesisAroundConditionalExpressionInInterpolatedString">
<source>Add parenthesis</source>
<target state="new">Add parenthesis</target>
<trans-unit id="Add_parentheses_around_conditional_expression_in_interpolated_string">
<source>Add parentheses</source>
<target state="new">Add parentheses</target>
<note />
</trans-unit>
</body>
......
......@@ -637,9 +637,9 @@
<target state="new">Use 'is null' check</target>
<note />
</trans-unit>
<trans-unit id="AddParenthesisAroundConditionalExpressionInInterpolatedString">
<source>Add parenthesis</source>
<target state="new">Add parenthesis</target>
<trans-unit id="Add_parentheses_around_conditional_expression_in_interpolated_string">
<source>Add parentheses</source>
<target state="new">Add parentheses</target>
<note />
</trans-unit>
</body>
......
......@@ -637,9 +637,9 @@
<target state="new">Use 'is null' check</target>
<note />
</trans-unit>
<trans-unit id="AddParenthesisAroundConditionalExpressionInInterpolatedString">
<source>Add parenthesis</source>
<target state="new">Add parenthesis</target>
<trans-unit id="Add_parentheses_around_conditional_expression_in_interpolated_string">
<source>Add parentheses</source>
<target state="new">Add parentheses</target>
<note />
</trans-unit>
</body>
......
......@@ -637,9 +637,9 @@
<target state="new">Use 'is null' check</target>
<note />
</trans-unit>
<trans-unit id="AddParenthesisAroundConditionalExpressionInInterpolatedString">
<source>Add parenthesis</source>
<target state="new">Add parenthesis</target>
<trans-unit id="Add_parentheses_around_conditional_expression_in_interpolated_string">
<source>Add parentheses</source>
<target state="new">Add parentheses</target>
<note />
</trans-unit>
</body>
......
......@@ -8,7 +8,7 @@ internal static class PredefinedCodeFixProviderNames
public const string AddAwait = nameof(AddAwait);
public const string AddAsync = nameof(AddAsync);
public const string AddParameter = nameof(AddParameter);
public const string AddParenthesisAroundConditionalExpressionInInterpolatedString = nameof(AddParenthesisAroundConditionalExpressionInInterpolatedString);
public const string AddParenthesesAroundConditionalExpressionInInterpolatedString = nameof(AddParenthesesAroundConditionalExpressionInInterpolatedString);
public const string ApplyNamingStyle = nameof(ApplyNamingStyle);
public const string AddBraces = nameof(AddBraces);
public const string ChangeReturnType = nameof(ChangeReturnType);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册