Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
ef433f7
Comment out a new line when return is pressed while the caret is with…
06needhamt Oct 12, 2019
c602333
Remove Unused Variable
06needhamt Dec 16, 2019
a8502a6
Add Tests
06needhamt Dec 16, 2019
f1bb7ba
Fix Indentation Issue
06needhamt Dec 19, 2019
1957373
Remove Abstract Comment Splitter and Add Abstract CommandHandler Defi…
06needhamt Dec 20, 2019
80e0396
Add More Tests
06needhamt Dec 21, 2019
8a1169e
Fix Broken Test
06needhamt Dec 21, 2019
9a71a5a
[WIP] Visual Basic Comment Splitter Implementation
06needhamt Dec 27, 2019
b1f3c6f
[WIP] VB Comment Splitter GetNoteToReplace Incorrect
06needhamt Dec 28, 2019
a2c724e
Fix VB Comment Splitter
06needhamt Dec 28, 2019
515c332
Implement VB Split Comment Test Worker
06needhamt Dec 28, 2019
8981612
Add More Test Cases
06needhamt Dec 30, 2019
604709e
Handle Line Continuation When Splitting Comments in VB
06needhamt Jan 5, 2020
41d257f
Update src/EditorFeatures/Core/Implementation/SplitComment/AbstractSp…
06needhamt Jan 22, 2020
c6a856a
Update src/EditorFeatures/VisualBasic/SplitComment/SplitCommentComman…
06needhamt Jan 22, 2020
304f5de
Merge branch 'master' into patch-38516
06needhamt Jan 26, 2020
83bb3da
Fix Tests
06needhamt Jan 26, 2020
79192ca
Address most of the review feedback
06needhamt Jan 26, 2020
ab9f2b7
All Tests Now Pass
06needhamt Jan 30, 2020
65ab354
Merge Master
06needhamt Feb 22, 2020
f4abf65
Add Space after split comment if it was present on the original
06needhamt Feb 25, 2020
8dfcd54
Address ArrowCase's Comments
06needhamt Feb 25, 2020
b056134
Update src/EditorFeatures/CSharp/SplitComment/SplitCommentCommandHand…
06needhamt Mar 1, 2020
b8277a5
Update src/EditorFeatures/CSharp/SplitComment/SplitCommentCommandHand…
06needhamt Mar 1, 2020
e05db8f
Update src/EditorFeatures/CSharp/SplitComment/SplitCommentCommandHand…
06needhamt Jun 3, 2020
0db9999
Merge Master
06needhamt Jun 3, 2020
451045d
Merge branch 'patch-38516' of https://github.com/06needhamt/roslyn in…
06needhamt Jun 3, 2020
29bb7c8
Fix Build
06needhamt Jun 3, 2020
3d7be65
Update Licences
06needhamt Jun 5, 2020
b2d427a
Merge branch 'patch-38516' of https://github.com/06needhamt/roslyn in…
06needhamt Jun 5, 2020
1767d0a
Fix Tests
06needhamt Jun 17, 2020
7ec767b
Merge remote-tracking branch 'upstream/master' into patch-38516
CyrusNajmabadi Jun 17, 2020
b235e3a
Spacing
CyrusNajmabadi Jun 17, 2020
30d1607
Make readonly
CyrusNajmabadi Jun 17, 2020
5f5d7b4
Merge remote-tracking branch 'upstream/master' into patch-38516
CyrusNajmabadi Oct 1, 2020
99b6d37
Update loc string
CyrusNajmabadi Oct 1, 2020
3843330
Rename types
CyrusNajmabadi Oct 1, 2020
4be6cb6
Simplify implementation greatly
CyrusNajmabadi Oct 1, 2020
aa8a65d
Share test code
CyrusNajmabadi Oct 1, 2020
2e7878c
Single command handler
CyrusNajmabadi Oct 1, 2020
d42d583
Update tests
CyrusNajmabadi Oct 1, 2020
c365008
Disable
CyrusNajmabadi Oct 1, 2020
c28fc12
Add UI
CyrusNajmabadi Oct 1, 2020
cb25ae8
Add tests
CyrusNajmabadi Oct 1, 2020
9227b28
Cleanup
CyrusNajmabadi Oct 1, 2020
4c5970f
Add comment
CyrusNajmabadi Oct 1, 2020
e91a3c7
Use normal async method
CyrusNajmabadi Oct 2, 2020
7d85da3
Remove partial
CyrusNajmabadi Oct 2, 2020
fc04d01
Parameterize test
CyrusNajmabadi Oct 2, 2020
47477f3
Revert
CyrusNajmabadi Oct 2, 2020
a22430e
Align code with UI
CyrusNajmabadi Oct 2, 2020
48bae5a
Update src/EditorFeatures/VisualBasic/SplitComment/VisualBasicSplitCo…
CyrusNajmabadi Oct 2, 2020
59b2a44
Handle cases like ////
CyrusNajmabadi Oct 2, 2020
8735f6a
Add vb tests
CyrusNajmabadi Oct 2, 2020
0b61756
Remove parameter
CyrusNajmabadi Oct 2, 2020
271937e
use IsKind
CyrusNajmabadi Oct 2, 2020
7a55545
Update buffer on UI thread
CyrusNajmabadi Oct 2, 2020
4f8c243
Support feature when span is selected
CyrusNajmabadi Oct 2, 2020
ff77147
Add test
CyrusNajmabadi Oct 2, 2020
2c05b36
Move code
CyrusNajmabadi Oct 2, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Composition;
using Microsoft.CodeAnalysis.Editor.Implementation.SplitComment;
using Microsoft.CodeAnalysis.Host.Mef;

namespace Microsoft.CodeAnalysis.Editor.CSharp.SplitComment
{
[ExportLanguageService(typeof(ISplitCommentService), LanguageNames.CSharp), Shared]
internal class CSharpSplitCommentService : ISplitCommentService
{
[ImportingConstructor]
[Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
public CSharpSplitCommentService()
{
}

public string CommentStart => "//";

public bool IsAllowed(SyntaxNode root, SyntaxTrivia trivia)
=> true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,7 @@ public int I
}", options: Option(CodeStyleOptions2.QualifyFieldAccess, true, NotificationOption2.Error));
}

[Theory, CombinatorialData, Trait(Traits.Feature, Traits.Features.EncapsulateField), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Tuples)]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these were all simplified because i added a reference from teh C# tests to the common tests so i could share a base type. Adding that reference made 'Test' ambiguous here. Fortunately, easy resolution was to not fully qualify any of this.

[Theory, CombinatorialData, Trait(Traits.Feature, Traits.Features.EncapsulateField), CompilerTrait(CompilerFeature.Tuples)]
public async Task TestTuple(TestHost host)
{
var text = @"
Expand Down Expand Up @@ -1439,7 +1439,7 @@ void M()
await TestAllOptionsOffAsync(host, text, expected, index: 1);
}

[Theory, CombinatorialData, Trait(Traits.Feature, Traits.Features.EncapsulateField), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Tuples)]
[Theory, CombinatorialData, Trait(Traits.Feature, Traits.Features.EncapsulateField), CompilerTrait(CompilerFeature.Tuples)]
public async Task TupleWithNames(TestHost host)
{
var text = @"
Expand Down Expand Up @@ -1481,7 +1481,7 @@ void M()
await TestAllOptionsOffAsync(host, text, expected, index: 1);
}

[Theory, CombinatorialData, Trait(Traits.Feature, Traits.Features.EncapsulateField), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.FunctionPointers)]
[Theory, CombinatorialData, Trait(Traits.Feature, Traits.Features.EncapsulateField), CompilerTrait(CompilerFeature.FunctionPointers)]
public async Task FunctionPointer(TestHost host)
{
var text = @"
Expand Down Expand Up @@ -1523,7 +1523,7 @@ void M()
await TestAllOptionsOffAsync(host, text, expected, index: 1);
}

[Theory, CombinatorialData, Trait(Traits.Feature, Traits.Features.EncapsulateField), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.FunctionPointers)]
[Theory, CombinatorialData, Trait(Traits.Feature, Traits.Features.EncapsulateField), CompilerTrait(CompilerFeature.FunctionPointers)]
public async Task FunctionPointerWithPrivateTypeParameter(TestHost host)
{
var text = @"
Expand Down Expand Up @@ -1567,7 +1567,7 @@ void M()
await TestAllOptionsOffAsync(host, text, expected, index: 1);
}

[Theory, CombinatorialData, Trait(Traits.Feature, Traits.Features.EncapsulateField), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.FunctionPointers)]
[Theory, CombinatorialData, Trait(Traits.Feature, Traits.Features.EncapsulateField), CompilerTrait(CompilerFeature.FunctionPointers)]
public async Task FunctionPointerWithPrivateTypeReturnValue(TestHost host)
{
var text = @"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ static void Main(string[] args)
}" + TestResources.NetFX.ValueTuple.tuplelib_cs, CodeActionIndex);
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Tuples)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction), CompilerTrait(CompilerFeature.Tuples)]
public async Task TestTupleDeclarationWithNames()
{
await TestInRegularAndScript1Async(
Expand All @@ -960,7 +960,7 @@ static void Main(string[] args)
}" + TestResources.NetFX.ValueTuple.tuplelib_cs, CodeActionIndex);
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Tuples)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction), CompilerTrait(CompilerFeature.Tuples)]
public async Task TestTupleDeclarationWithSomeNames()
{
await TestInRegularAndScript1Async(
Expand All @@ -987,7 +987,7 @@ static void Main(string[] args)
}" + TestResources.NetFX.ValueTuple.tuplelib_cs, CodeActionIndex);
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Tuples)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction), CompilerTrait(CompilerFeature.Tuples)]
public async Task TestTupleWith1Arity()
{
await TestInRegularAndScript1Async(
Expand Down Expand Up @@ -1016,7 +1016,7 @@ static void NewMethod(ValueTuple<int> y)
}" + TestResources.NetFX.ValueTuple.tuplelib_cs, CodeActionIndex);
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Tuples)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction), CompilerTrait(CompilerFeature.Tuples)]
public async Task TestTupleLiteralWithNames()
{
await TestInRegularAndScript1Async(
Expand All @@ -1043,7 +1043,7 @@ static void Main(string[] args)
}" + TestResources.NetFX.ValueTuple.tuplelib_cs, CodeActionIndex);
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Tuples)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction), CompilerTrait(CompilerFeature.Tuples)]
public async Task TestTupleDeclarationAndLiteralWithNames()
{
await TestInRegularAndScript1Async(
Expand All @@ -1070,7 +1070,7 @@ static void Main(string[] args)
}" + TestResources.NetFX.ValueTuple.tuplelib_cs, CodeActionIndex);
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Tuples)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction), CompilerTrait(CompilerFeature.Tuples)]
public async Task TestTupleIntoVar()
{
await TestInRegularAndScript1Async(
Expand All @@ -1097,7 +1097,7 @@ static void Main(string[] args)
}" + TestResources.NetFX.ValueTuple.tuplelib_cs, CodeActionIndex);
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Tuples)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction), CompilerTrait(CompilerFeature.Tuples)]
public async Task RefactorWithoutSystemValueTuple()
{
await TestInRegularAndScript1Async(
Expand All @@ -1124,7 +1124,7 @@ static void Main(string[] args)
}", CodeActionIndex);
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Tuples)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction), CompilerTrait(CompilerFeature.Tuples)]
public async Task TestTupleWithNestedNamedTuple()
{
// This is not the best refactoring, but this is an edge case
Expand Down Expand Up @@ -1152,7 +1152,7 @@ static void Main(string[] args)
}" + TestResources.NetFX.ValueTuple.tuplelib_cs, CodeActionIndex);
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Tuples)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction), CompilerTrait(CompilerFeature.Tuples)]
public async Task TestDeconstruction()
{
await TestInRegularAndScript1Async(
Expand All @@ -1179,7 +1179,7 @@ static void Main(string[] args)
}" + TestResources.NetFX.ValueTuple.tuplelib_cs, CodeActionIndex);
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Tuples)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction), CompilerTrait(CompilerFeature.Tuples)]
public async Task TestDeconstruction2()
{
await TestInRegularAndScript1Async(
Expand Down Expand Up @@ -1209,7 +1209,7 @@ static int NewMethod()
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction)]
[Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.OutVar)]
[CompilerTrait(CompilerFeature.OutVar)]
public async Task TestOutVar()
{
await TestInRegularAndScript1Async(
Expand Down Expand Up @@ -1240,7 +1240,7 @@ static void NewMethod(int i, out int r, out int y)
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction)]
[Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Patterns)]
[CompilerTrait(CompilerFeature.Patterns)]
public async Task TestIsPattern()
{
await TestInRegularAndScript1Async(
Expand Down Expand Up @@ -1271,7 +1271,7 @@ static void NewMethod(int i, out int r, out int y)
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction)]
[Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Patterns)]
[CompilerTrait(CompilerFeature.Patterns)]
public async Task TestOutVarAndIsPattern()
{
await TestInRegularAndScript1Async(
Expand Down Expand Up @@ -1302,7 +1302,7 @@ static void NewMethod(out int r, out int y, out int z)
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction)]
[Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Patterns)]
[CompilerTrait(CompilerFeature.Patterns)]
public async Task ConflictingOutVarLocals()
{
await TestInRegularAndScript1Async(
Expand Down Expand Up @@ -1343,7 +1343,7 @@ static void NewMethod(out int r, out int y)
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractLocalFunction)]
[Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Patterns)]
[CompilerTrait(CompilerFeature.Patterns)]
public async Task ConflictingPatternLocals()
{
await TestInRegularAndScript1Async(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ private static void NewMethod(out Construct obj1, out Construct obj2, out Constr
}");
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Tuples)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod), CompilerTrait(CompilerFeature.Tuples)]
[WorkItem(11196, "https://github.com/dotnet/roslyn/issues/11196")]
public async Task TestTuple()
{
Expand Down Expand Up @@ -949,7 +949,7 @@ private static (int, int) NewMethod()
}" + TestResources.NetFX.ValueTuple.tuplelib_cs);
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Tuples)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod), CompilerTrait(CompilerFeature.Tuples)]
[WorkItem(11196, "https://github.com/dotnet/roslyn/issues/11196")]
public async Task TestTupleDeclarationWithNames()
{
Expand Down Expand Up @@ -977,7 +977,7 @@ private static (int a, int b) NewMethod()
}" + TestResources.NetFX.ValueTuple.tuplelib_cs);
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Tuples)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod), CompilerTrait(CompilerFeature.Tuples)]
[WorkItem(11196, "https://github.com/dotnet/roslyn/issues/11196")]
public async Task TestTupleDeclarationWithSomeNames()
{
Expand Down Expand Up @@ -1005,7 +1005,7 @@ private static (int a, int) NewMethod()
}" + TestResources.NetFX.ValueTuple.tuplelib_cs);
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Tuples)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod), CompilerTrait(CompilerFeature.Tuples)]
[WorkItem(18311, "https://github.com/dotnet/roslyn/issues/18311")]
public async Task TestTupleWith1Arity()
{
Expand Down Expand Up @@ -1035,7 +1035,7 @@ private static void NewMethod(ValueTuple<int> y)
}" + TestResources.NetFX.ValueTuple.tuplelib_cs);
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Tuples)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod), CompilerTrait(CompilerFeature.Tuples)]
[WorkItem(11196, "https://github.com/dotnet/roslyn/issues/11196")]
public async Task TestTupleLiteralWithNames()
{
Expand Down Expand Up @@ -1063,7 +1063,7 @@ private static (int, int) NewMethod()
}" + TestResources.NetFX.ValueTuple.tuplelib_cs);
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Tuples)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod), CompilerTrait(CompilerFeature.Tuples)]
[WorkItem(11196, "https://github.com/dotnet/roslyn/issues/11196")]
public async Task TestTupleDeclarationAndLiteralWithNames()
{
Expand Down Expand Up @@ -1091,7 +1091,7 @@ private static (int a, int b) NewMethod()
}" + TestResources.NetFX.ValueTuple.tuplelib_cs);
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Tuples)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod), CompilerTrait(CompilerFeature.Tuples)]
[WorkItem(11196, "https://github.com/dotnet/roslyn/issues/11196")]
public async Task TestTupleIntoVar()
{
Expand Down Expand Up @@ -1119,7 +1119,7 @@ private static (int c, int d) NewMethod()
}" + TestResources.NetFX.ValueTuple.tuplelib_cs);
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Tuples)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod), CompilerTrait(CompilerFeature.Tuples)]
[WorkItem(11196, "https://github.com/dotnet/roslyn/issues/11196")]
public async Task RefactorWithoutSystemValueTuple()
{
Expand Down Expand Up @@ -1147,7 +1147,7 @@ private static (int c, int d) NewMethod()
}");
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Tuples)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod), CompilerTrait(CompilerFeature.Tuples)]
[WorkItem(11196, "https://github.com/dotnet/roslyn/issues/11196")]
public async Task TestTupleWithNestedNamedTuple()
{
Expand Down Expand Up @@ -1176,7 +1176,7 @@ private static (int, int, int, int, int, int, int, string, string) NewMethod()
}" + TestResources.NetFX.ValueTuple.tuplelib_cs);
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Tuples)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod), CompilerTrait(CompilerFeature.Tuples)]
public async Task TestDeconstruction()
{
await TestInRegularAndScript1Async(
Expand All @@ -1203,7 +1203,7 @@ private static (int, int) NewMethod()
}" + TestResources.NetFX.ValueTuple.tuplelib_cs);
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod), Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Tuples)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod), CompilerTrait(CompilerFeature.Tuples)]
public async Task TestDeconstruction2()
{
await TestInRegularAndScript1Async(
Expand Down Expand Up @@ -1233,7 +1233,7 @@ private static int NewMethod()
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod)]
[Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.OutVar)]
[CompilerTrait(CompilerFeature.OutVar)]
public async Task TestOutVar()
{
await TestInRegularAndScript1Async(
Expand Down Expand Up @@ -1264,7 +1264,7 @@ private static void NewMethod(int i, out int r, out int y)
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod)]
[Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Patterns)]
[CompilerTrait(CompilerFeature.Patterns)]
public async Task TestIsPattern()
{
await TestInRegularAndScript1Async(
Expand Down Expand Up @@ -1295,7 +1295,7 @@ private static void NewMethod(int i, out int r, out int y)
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod)]
[Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Patterns)]
[CompilerTrait(CompilerFeature.Patterns)]
public async Task TestOutVarAndIsPattern()
{
await TestInRegularAndScript1Async(
Expand Down Expand Up @@ -1326,7 +1326,7 @@ private static void NewMethod(out int r, out int y, out int z)
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod)]
[Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Patterns)]
[CompilerTrait(CompilerFeature.Patterns)]
public async Task ConflictingOutVarLocals()
{
await TestInRegularAndScript1Async(
Expand Down Expand Up @@ -1367,7 +1367,7 @@ private static void NewMethod(out int r, out int y)
}

[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsExtractMethod)]
[Test.Utilities.CompilerTrait(Test.Utilities.CompilerFeature.Patterns)]
[CompilerTrait(CompilerFeature.Patterns)]
public async Task ConflictingPatternLocals()
{
await TestInRegularAndScript1Async(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2901,7 +2901,7 @@ public virtual void Bar() {}

// CompilationExtensions is in the Microsoft.CodeAnalysis.Test.Utilities namespace
// which has a "Traits" type that conflicts with the one in Roslyn.Test.Utilities
var reference = MetadataReference.CreateFromImage(Test.Utilities.CompilationExtensions.EmitToArray(compilation));
var reference = MetadataReference.CreateFromImage(CompilationExtensions.EmitToArray(compilation));
var p1 = workspace.CurrentSolution.Projects.First(p => p.Name == "P1");
var updatedP1 = p1.AddMetadataReference(reference);
workspace.ChangeSolution(updatedP1.Solution);
Expand Down Expand Up @@ -2952,7 +2952,7 @@ public override void M(in int x)
var origComp = await workspace.CurrentSolution.Projects.Single().GetCompilationAsync();
var options = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.Latest);
var libComp = origComp.RemoveAllSyntaxTrees().AddSyntaxTrees(CSharpSyntaxTree.ParseText(before, options: options));
var libRef = MetadataReference.CreateFromImage(Test.Utilities.CompilationExtensions.EmitToArray(libComp));
var libRef = MetadataReference.CreateFromImage(CompilationExtensions.EmitToArray(libComp));

var project = workspace.CurrentSolution.Projects.Single();
var updatedProject = project.AddMetadataReference(libRef);
Expand Down
Loading