diff --git a/src/EditorFeatures/CSharpTest/Classification/SemanticClassifierTests.cs b/src/EditorFeatures/CSharpTest/Classification/SemanticClassifierTests.cs index 11ebcf8d39a8cc653bdd6e30ae7a25684af5cc3d..a19546ef0ee10362324a6ef95fdb8a6a8d4412f7 100644 --- a/src/EditorFeatures/CSharpTest/Classification/SemanticClassifierTests.cs +++ b/src/EditorFeatures/CSharpTest/Classification/SemanticClassifierTests.cs @@ -1427,7 +1427,7 @@ public async Task TestCreateWithBufferNotInWorkspace() edit.Apply(); } - await waiter.CreateWaitTask().ConfigureAwait(true); + await waiter.CreateWaitTask(); } } } @@ -1452,7 +1452,7 @@ public async Task TestGetTagsOnBufferTagger() var tagger = provider.CreateTagger(document.TextBuffer); using (var disposable = (IDisposable)tagger) { - await waiter.CreateWaitTask().ConfigureAwait(true); + await waiter.CreateWaitTask(); var tags = tagger.GetTags(document.TextBuffer.CurrentSnapshot.GetSnapshotSpanCollection()); var allTags = tagger.GetAllTags(document.TextBuffer.CurrentSnapshot.GetSnapshotSpanCollection(), CancellationToken.None); diff --git a/src/EditorFeatures/CSharpTest/Classification/SyntacticTaggerTests.cs b/src/EditorFeatures/CSharpTest/Classification/SyntacticTaggerTests.cs index fbcdd45dd6e9938cec17293f2b9cc9bc1ddb6037..3b82d52b4e8a1e0303d2e4acacf944e920991abd 100644 --- a/src/EditorFeatures/CSharpTest/Classification/SyntacticTaggerTests.cs +++ b/src/EditorFeatures/CSharpTest/Classification/SyntacticTaggerTests.cs @@ -42,13 +42,13 @@ public async Task TestTagsChangedForEntireFile() checkpoint.Release(); }; - await checkpoint.Task.ConfigureAwait(true); + await checkpoint.Task; checkpoint = new Checkpoint(); // Now apply an edit that require us to reclassify more that just the current line subjectBuffer.Insert(document.CursorPosition.Value, "\""); - await checkpoint.Task.ConfigureAwait(true); + await checkpoint.Task; Assert.Equal(subjectBuffer.CurrentSnapshot.Length, span.Length); } } diff --git a/src/EditorFeatures/CSharpTest/Diagnostics/GenerateType/GenerateTypeTests.cs b/src/EditorFeatures/CSharpTest/Diagnostics/GenerateType/GenerateTypeTests.cs index 378e5176380cce6134ede2ba74a03b97faa11b13..488242cde8edfc9e6eee09295cad03a56606218f 100644 --- a/src/EditorFeatures/CSharpTest/Diagnostics/GenerateType/GenerateTypeTests.cs +++ b/src/EditorFeatures/CSharpTest/Diagnostics/GenerateType/GenerateTypeTests.cs @@ -131,7 +131,7 @@ public async Task TestGenerateClassFromFieldDeclarationIntoGlobalNamespace() @"class Program { void Main ( ) { [|Foo|] f ; } } ", @"internal class Foo { } ", expectedContainers: Array.Empty(), -expectedDocumentName: "Foo.cs").ConfigureAwait(true); +expectedDocumentName: "Foo.cs"); } [WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -141,7 +141,7 @@ public async Task TestGenerateClassFromFieldDeclarationIntoCustomNamespace() @"class Class { [|TestNamespace|].Foo f; }", @"namespace TestNamespace { internal class Foo { } }", expectedContainers: new List { "TestNamespace" }, -expectedDocumentName: "Foo.cs").ConfigureAwait(true); +expectedDocumentName: "Foo.cs"); } [WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -412,7 +412,7 @@ public async Task TestGenerateClassFromIntoNewNamespace() @"class Class { static void Main(string[] args) { [|N|].C c; } }", @"namespace N { internal class C { } }", expectedContainers: new List { "N" }, -expectedDocumentName: "C.cs").ConfigureAwait(true); +expectedDocumentName: "C.cs"); } [WorkItem(538558)] @@ -1025,7 +1025,7 @@ public async Task TestGenerateIntoNewFile() @"class Class { void F() { new [|Foo|].Bar(); } }", @"namespace Foo { internal class Bar { public Bar() { } } }", expectedContainers: new List { "Foo" }, -expectedDocumentName: "Bar.cs").ConfigureAwait(true); +expectedDocumentName: "Bar.cs"); } [WorkItem(539620)] @@ -1520,7 +1520,7 @@ public async Task TestAddDocumentForGlobalNamespace() @"class C : [|Foo|]", "internal class Foo { }", Array.Empty(), -"Foo.cs").ConfigureAwait(true); +"Foo.cs"); } [WorkItem(543886)] @@ -1682,7 +1682,7 @@ public class ClassB expectedContainers: Array.Empty(), expectedDocumentName: "ClassB.cs", compareTokens: false, - isLine: false).ConfigureAwait(true); + isLine: false); } [WorkItem(932602)] @@ -1714,7 +1714,7 @@ public class ClassB expectedContainers: new List { "Namespace1", "Namespace2" }, expectedDocumentName: "ClassB.cs", compareTokens: false, - isLine: false).ConfigureAwait(true); + isLine: false); } [WorkItem(612700)] diff --git a/src/EditorFeatures/CSharpTest/Diagnostics/GenerateType/GenerateTypeTests_Dialog.cs b/src/EditorFeatures/CSharpTest/Diagnostics/GenerateType/GenerateTypeTests_Dialog.cs index 7627e89940d9c4192d51b1788e754863c8a74e55..59c05675b4f56b737f2ec1982bc6de4045e5c737 100644 --- a/src/EditorFeatures/CSharpTest/Diagnostics/GenerateType/GenerateTypeTests_Dialog.cs +++ b/src/EditorFeatures/CSharpTest/Diagnostics/GenerateType/GenerateTypeTests_Dialog.cs @@ -39,7 +39,7 @@ void Main() class Foo { }", -isNewFile: false).ConfigureAwait(true); +isNewFile: false); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -73,7 +73,7 @@ class Foo { } }", -isNewFile: false).ConfigureAwait(true); +isNewFile: false); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -105,7 +105,7 @@ class Foo { } }", -isNewFile: false).ConfigureAwait(true); +isNewFile: false); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -143,7 +143,7 @@ class Foo } } }", -isNewFile: false).ConfigureAwait(true); +isNewFile: false); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -181,7 +181,7 @@ class Foo } } }", -isNewFile: false).ConfigureAwait(true); +isNewFile: false); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -216,7 +216,7 @@ public Foo(int bar, int baz) this.baz = baz; } }", -isNewFile: false).ConfigureAwait(true); +isNewFile: false); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -245,7 +245,7 @@ static void Main(string[] args) class Foo : List { }", -isNewFile: false).ConfigureAwait(true); +isNewFile: false); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -285,7 +285,7 @@ public interface Foo }", accessibility: Accessibility.Public, typeKind: TypeKind.Interface, -isNewFile: false).ConfigureAwait(true); +isNewFile: false); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -325,7 +325,7 @@ internal struct Foo }", accessibility: Accessibility.Internal, typeKind: TypeKind.Struct, -isNewFile: false).ConfigureAwait(true); +isNewFile: false); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -365,7 +365,7 @@ enum Foo }", accessibility: Accessibility.NotApplicable, typeKind: TypeKind.Enum, -isNewFile: false).ConfigureAwait(true); +isNewFile: false); } [WorkItem(850101)] @@ -401,7 +401,7 @@ enum Foo defaultNamespace: "ConsoleApplication", accessibility: Accessibility.NotApplicable, typeKind: TypeKind.Enum, -isNewFile: false).ConfigureAwait(true); +isNewFile: false); } [WorkItem(850101)] @@ -443,7 +443,7 @@ enum Foo defaultNamespace: "ConsoleApplication", accessibility: Accessibility.NotApplicable, typeKind: TypeKind.Enum, -isNewFile: false).ConfigureAwait(true); +isNewFile: false); } #endregion @@ -484,7 +484,7 @@ public interface Foo accessibility: Accessibility.Public, typeKind: TypeKind.Interface, isNewFile: false, -existingFilename: "Test2.cs").ConfigureAwait(true); +existingFilename: "Test2.cs"); } [WorkItem(850101)] @@ -530,7 +530,7 @@ void Main() accessibility: Accessibility.Public, typeKind: TypeKind.Interface, isNewFile: false, -existingFilename: "Test2.cs").ConfigureAwait(true); +existingFilename: "Test2.cs"); } [WorkItem(850101)] @@ -577,7 +577,7 @@ void Main() accessibility: Accessibility.Public, typeKind: TypeKind.Interface, isNewFile: false, -existingFilename: "Test2.cs").ConfigureAwait(true); +existingFilename: "Test2.cs"); } [WorkItem(850101)] @@ -624,7 +624,7 @@ void Main() accessibility: Accessibility.Public, typeKind: TypeKind.Interface, isNewFile: false, -existingFilename: "Test2.cs").ConfigureAwait(true); +existingFilename: "Test2.cs"); } [WorkItem(850101)] @@ -664,7 +664,7 @@ public interface Foo accessibility: Accessibility.Public, typeKind: TypeKind.Interface, isNewFile: false, -existingFilename: "Test2.cs").ConfigureAwait(true); +existingFilename: "Test2.cs"); } #endregion @@ -702,7 +702,7 @@ public interface Foo typeKind: TypeKind.Interface, isNewFile: true, newFileFolderContainers: Array.Empty(), -newFileName: "Test2.cs").ConfigureAwait(true); +newFileName: "Test2.cs"); } [WorkItem(850101)] @@ -743,7 +743,7 @@ public interface Foo typeKind: TypeKind.Interface, isNewFile: true, newFileFolderContainers: new string[] { "outer", "inner" }, -newFileName: "Test2.cs").ConfigureAwait(true); +newFileName: "Test2.cs"); } [WorkItem(850101)] @@ -787,7 +787,7 @@ void Main() typeKind: TypeKind.Interface, isNewFile: true, newFileFolderContainers: new string[] { "outer", "inner" }, -newFileName: "Test2.cs").ConfigureAwait(true); +newFileName: "Test2.cs"); } [WorkItem(850101)] @@ -825,7 +825,7 @@ public interface Foo typeKind: TypeKind.Interface, isNewFile: true, newFileFolderContainers: new string[] { "outer", "inner" }, -newFileName: "Test2.cs").ConfigureAwait(true); +newFileName: "Test2.cs"); } [WorkItem(850101)] @@ -870,7 +870,7 @@ void Main() typeKind: TypeKind.Interface, isNewFile: true, newFileFolderContainers: new string[] { "outer", "inner" }, -newFileName: "Test2.cs").ConfigureAwait(true); +newFileName: "Test2.cs"); } [WorkItem(850101)] @@ -919,7 +919,7 @@ void Main() typeKind: TypeKind.Interface, isNewFile: true, newFileFolderContainers: new string[] { "outer" }, -newFileName: "Test2.cs").ConfigureAwait(true); +newFileName: "Test2.cs"); } [WorkItem(850101)] @@ -970,7 +970,7 @@ namespace A.B typeKind: TypeKind.Interface, isNewFile: true, newFileFolderContainers: new string[] { "outer" }, -newFileName: "Test2.cs").ConfigureAwait(true); +newFileName: "Test2.cs"); } [WorkItem(898452)] @@ -1028,7 +1028,7 @@ void Main() isNewFile: true, areFoldersValidIdentifiers: false, newFileFolderContainers: new string[] { "123", "456" }, -newFileName: "Test2.cs").ConfigureAwait(true); +newFileName: "Test2.cs"); } #endregion @@ -1073,7 +1073,7 @@ public interface Foo typeKind: TypeKind.Interface, isNewFile: false, existingFilename: "Test2.cs", -projectName: "Assembly2").ConfigureAwait(true); +projectName: "Assembly2"); } [WorkItem(850101)] @@ -1124,7 +1124,7 @@ public interface Foo typeKind: TypeKind.Interface, isNewFile: false, existingFilename: "Test2.cs", -projectName: "Assembly2").ConfigureAwait(true); +projectName: "Assembly2"); } [WorkItem(850101)] @@ -1185,7 +1185,7 @@ void Main() typeKind: TypeKind.Interface, isNewFile: false, existingFilename: "Test2.cs", -projectName: "Assembly2").ConfigureAwait(true); +projectName: "Assembly2"); } #endregion @@ -1226,7 +1226,7 @@ public interface Foo isNewFile: true, newFileName: "Test2.cs", newFileFolderContainers: Array.Empty(), -projectName: "Assembly2").ConfigureAwait(true); +projectName: "Assembly2"); } [WorkItem(850101)] @@ -1273,7 +1273,7 @@ void Main() isNewFile: true, newFileName: "Test2.cs", newFileFolderContainers: new string[] { "outer", "inner" }, -projectName: "Assembly2").ConfigureAwait(true); +projectName: "Assembly2"); } [WorkItem(850101)] @@ -1314,7 +1314,7 @@ public interface Foo isNewFile: true, newFileName: "Test2.cs", newFileFolderContainers: new string[] { "outer", "inner" }, -projectName: "Assembly2").ConfigureAwait(true); +projectName: "Assembly2"); } [WorkItem(850101)] @@ -1362,7 +1362,7 @@ void Main() isNewFile: true, newFileName: "Test2.cs", newFileFolderContainers: new string[] { "outer", "inner" }, -projectName: "Assembly2").ConfigureAwait(true); +projectName: "Assembly2"); } [WorkItem(850101)] @@ -1404,7 +1404,7 @@ public interface Foo isNewFile: true, newFileName: "Test2.cs", newFileFolderContainers: new string[] { "outer", "inner" }, -projectName: "Assembly2").ConfigureAwait(true); +projectName: "Assembly2"); } #endregion #endregion @@ -1444,7 +1444,7 @@ End Namespace isNewFile: true, newFileName: "Test2.vb", newFileFolderContainers: Array.Empty(), -projectName: "Assembly2").ConfigureAwait(true); +projectName: "Assembly2"); } [WorkItem(850101)] @@ -1490,7 +1490,7 @@ void Main() isNewFile: true, newFileName: "Test2.vb", newFileFolderContainers: new string[] { "outer", "inner" }, -projectName: "Assembly2").ConfigureAwait(true); +projectName: "Assembly2"); } [WorkItem(850101)] @@ -1530,7 +1530,7 @@ End Namespace isNewFile: true, newFileName: "Test2.vb", newFileFolderContainers: new string[] { "outer", "inner" }, -projectName: "Assembly2").ConfigureAwait(true); +projectName: "Assembly2"); } [WorkItem(850101)] @@ -1577,7 +1577,7 @@ void Main() isNewFile: true, newFileName: "Test2.vb", newFileFolderContainers: new string[] { "outer", "inner" }, -projectName: "Assembly2").ConfigureAwait(true); +projectName: "Assembly2"); } [WorkItem(850101)] @@ -1618,7 +1618,7 @@ End Namespace isNewFile: true, newFileName: "Test2.vb", newFileFolderContainers: new string[] { "outer", "inner" }, -projectName: "Assembly2").ConfigureAwait(true); +projectName: "Assembly2"); } [WorkItem(850101)] @@ -1665,7 +1665,7 @@ End Namespace isNewFile: true, newFileName: "Test3.vb", newFileFolderContainers: new string[] { "outer", "inner" }, -projectName: "Assembly2").ConfigureAwait(true); +projectName: "Assembly2"); } [WorkItem(858826)] @@ -1704,7 +1704,7 @@ End Namespace isNewFile: true, newFileName: "Test2.vb", newFileFolderContainers: Array.Empty(), -projectName: "Assembly2").ConfigureAwait(true); +projectName: "Assembly2"); } [WorkItem(850101)] @@ -1745,7 +1745,7 @@ End Namespace typeKind: TypeKind.Class, isNewFile: false, existingFilename: "Test2.vb", -projectName: "Assembly2").ConfigureAwait(true); +projectName: "Assembly2"); } [WorkItem(850101)] @@ -1792,7 +1792,7 @@ void Main() typeKind: TypeKind.Class, isNewFile: false, existingFilename: "Test2.vb", -projectName: "Assembly2").ConfigureAwait(true); +projectName: "Assembly2"); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -1837,7 +1837,7 @@ End Namespace typeKind: TypeKind.Class, isNewFile: false, existingFilename: "Test2.vb", -projectName: "Assembly2").ConfigureAwait(true); +projectName: "Assembly2"); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -1889,7 +1889,7 @@ End Namespace typeKind: TypeKind.Class, isNewFile: false, existingFilename: "Test2.vb", -projectName: "Assembly2").ConfigureAwait(true); +projectName: "Assembly2"); } [WorkItem(861362)] @@ -1930,7 +1930,7 @@ End Namespace newFileName: "Test2.vb", newFileFolderContainers: Array.Empty(), projectName: "Assembly2", -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure | TypeKindOptions.Module)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure | TypeKindOptions.Module)); } #endregion @@ -1957,7 +1957,7 @@ public class D }", accessibility: Accessibility.Public, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(true, TypeKindOptions.BaseList, false)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(true, TypeKindOptions.BaseList, false)); } [WorkItem(861462)] @@ -1980,7 +1980,7 @@ public interface DDD accessibility: Accessibility.Public, typeKind: TypeKind.Interface, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(true, TypeKindOptions.Interface, false)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(true, TypeKindOptions.Interface, false)); } [WorkItem(861462)] @@ -2003,7 +2003,7 @@ public interface DDD accessibility: Accessibility.Public, typeKind: TypeKind.Interface, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(true, TypeKindOptions.Interface, false)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(true, TypeKindOptions.Interface, false)); } [WorkItem(861362)] @@ -2034,7 +2034,7 @@ public class A accessibility: Accessibility.Public, typeKind: TypeKind.Class, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.MemberAccessWithNamespace)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.MemberAccessWithNamespace)); } [WorkItem(861362)] @@ -2072,7 +2072,7 @@ public class B accessibility: Accessibility.Public, typeKind: TypeKind.Class, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.MemberAccessWithNamespace)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.MemberAccessWithNamespace)); } [WorkItem(861600)] @@ -2111,7 +2111,7 @@ public class Foo accessibility: Accessibility.Public, typeKind: TypeKind.Class, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure)); } [WorkItem(861600)] @@ -2150,7 +2150,7 @@ public class Foo accessibility: Accessibility.Public, typeKind: TypeKind.Class, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure | TypeKindOptions.Interface | TypeKindOptions.Delegate)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure | TypeKindOptions.Interface | TypeKindOptions.Delegate)); } [WorkItem(861600)] @@ -2188,7 +2188,7 @@ public class Bar accessibility: Accessibility.Public, typeKind: TypeKind.Class, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.MemberAccessWithNamespace)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.MemberAccessWithNamespace)); } [WorkItem(861600)] @@ -2219,7 +2219,7 @@ public class Bar accessibility: Accessibility.Public, typeKind: TypeKind.Class, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.MemberAccessWithNamespace)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.MemberAccessWithNamespace)); } [WorkItem(861600)] @@ -2240,7 +2240,7 @@ namespace Bar }", languageName: LanguageNames.CSharp, typeName: "Bar", -isMissing: true).ConfigureAwait(true); +isMissing: true); } [WorkItem(876202)] @@ -2272,7 +2272,7 @@ public struct Bar accessibility: Accessibility.Public, typeKind: TypeKind.Structure, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure, false)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure, false)); } #endregion #region Delegates @@ -2308,7 +2308,7 @@ static void foo() accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure | TypeKindOptions.Delegate)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure | TypeKindOptions.Delegate)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -2343,7 +2343,7 @@ static void foo() accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure | TypeKindOptions.Delegate)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure | TypeKindOptions.Delegate)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -2376,7 +2376,7 @@ static void Main(string[] args) accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure | TypeKindOptions.Delegate)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure | TypeKindOptions.Delegate)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -2409,7 +2409,7 @@ static void Main(string[] args) accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure | TypeKindOptions.Delegate)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure | TypeKindOptions.Delegate)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -2442,7 +2442,7 @@ static void Main(string[] args) accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure | TypeKindOptions.Delegate)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure | TypeKindOptions.Delegate)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -2471,7 +2471,7 @@ static void Main(string[] args) accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure | TypeKindOptions.Delegate)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure | TypeKindOptions.Delegate)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -2500,7 +2500,7 @@ static void Main(string[] args) accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure | TypeKindOptions.Delegate)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure | TypeKindOptions.Delegate)); } [WorkItem(872935)] @@ -2530,7 +2530,7 @@ static void Main(string[] args) accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -2565,7 +2565,7 @@ static void foo() accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -2600,7 +2600,7 @@ static void Main(string[] args) accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -2633,7 +2633,7 @@ static void Main(string[] args) accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -2666,7 +2666,7 @@ static void Main(string[] args) accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -2696,7 +2696,7 @@ static void Main(string[] args) accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -2725,7 +2725,7 @@ static void Main(string[] args) accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -2760,7 +2760,7 @@ static void foo() accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -2795,7 +2795,7 @@ static void Main(string[] args) accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -2828,7 +2828,7 @@ static void Main(string[] args) accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -2861,7 +2861,7 @@ static void Main(string[] args) accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -2891,7 +2891,7 @@ static void Main(string[] args) accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -2920,7 +2920,7 @@ static void Main(string[] args) accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.AllOptions)); } [WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -2957,7 +2957,7 @@ End Namespace isNewFile: true, newFileName: "Test2.vb", newFileFolderContainers: Array.Empty(), -projectName: "Assembly2").ConfigureAwait(true); +projectName: "Assembly2"); } [WorkItem(860210)] @@ -2986,7 +2986,7 @@ static void Main(string[] args) ", accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, -isNewFile: false).ConfigureAwait(true); +isNewFile: false); } #endregion #region Dev12Filtering @@ -3017,7 +3017,7 @@ public class B accessibility: Accessibility.Public, typeKind: TypeKind.Class, isNewFile: false, -assertTypeKindAbsent: new[] { TypeKindOptions.Enum }).ConfigureAwait(true); +assertTypeKindAbsent: new[] { TypeKindOptions.Enum }); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -3054,7 +3054,7 @@ public class B accessibility: Accessibility.Public, typeKind: TypeKind.Class, isNewFile: false, -assertTypeKindAbsent: new[] { TypeKindOptions.Enum }).ConfigureAwait(true); +assertTypeKindAbsent: new[] { TypeKindOptions.Enum }); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -3091,7 +3091,7 @@ public class Bar accessibility: Accessibility.Public, typeKind: TypeKind.Class, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(true, TypeKindOptions.BaseList)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(true, TypeKindOptions.BaseList)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -3134,7 +3134,7 @@ public class Bar accessibility: Accessibility.Public, typeKind: TypeKind.Class, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.BaseList)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.BaseList)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -3183,7 +3183,7 @@ public class Bar accessibility: Accessibility.Public, typeKind: TypeKind.Class, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(true, TypeKindOptions.BaseList)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(true, TypeKindOptions.BaseList)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -3212,7 +3212,7 @@ public class D }", accessibility: Accessibility.Public, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(true, TypeKindOptions.BaseList, false)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(true, TypeKindOptions.BaseList, false)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -3241,7 +3241,7 @@ public class D }", accessibility: Accessibility.Public, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.BaseList, false)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.BaseList, false)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -3276,7 +3276,7 @@ public class D }", accessibility: Accessibility.Public, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.BaseList, false)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.BaseList, false)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -3309,7 +3309,7 @@ class A accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Delegate)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Delegate)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -3334,7 +3334,7 @@ class A accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Delegate)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Delegate)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -3369,7 +3369,7 @@ namespace NS accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Delegate)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Delegate)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -3396,7 +3396,7 @@ namespace NS accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Delegate)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Delegate)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -3437,7 +3437,7 @@ public class foo accessibility: Accessibility.Public, typeKind: TypeKind.Class, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure | TypeKindOptions.Module)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure | TypeKindOptions.Module)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -3470,7 +3470,7 @@ public class foo accessibility: Accessibility.Public, typeKind: TypeKind.Class, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure | TypeKindOptions.Module)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(false, TypeKindOptions.Class | TypeKindOptions.Structure | TypeKindOptions.Module)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -3503,7 +3503,7 @@ public class A accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(true, TypeKindOptions.Delegate)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(true, TypeKindOptions.Delegate)); } [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateType)] @@ -3542,7 +3542,7 @@ public class A accessibility: Accessibility.Public, typeKind: TypeKind.Delegate, isNewFile: false, -assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(true, TypeKindOptions.Delegate)).ConfigureAwait(true); +assertGenerateTypeDialogOptions: new GenerateTypeDialogOptions(true, TypeKindOptions.Delegate)); } #endregion } diff --git a/src/EditorFeatures/CSharpTest/EventHookup/EventHookupCommandHandlerTests.cs b/src/EditorFeatures/CSharpTest/EventHookup/EventHookupCommandHandlerTests.cs index 72ab9590efb7a785753175911a78cfbcb33fc0f6..a944a092c256a733bc7ab6e1510bb452b835d3d8 100644 --- a/src/EditorFeatures/CSharpTest/EventHookup/EventHookupCommandHandlerTests.cs +++ b/src/EditorFeatures/CSharpTest/EventHookup/EventHookupCommandHandlerTests.cs @@ -24,7 +24,7 @@ void M() using (var testState = EventHookupTestState.CreateTestState(markup)) { testState.SendTypeChar('='); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertShowing("C_MyEvent;"); } } @@ -50,7 +50,7 @@ void M() using (var testState = EventHookupTestState.CreateTestState(markup)) { testState.SendTypeChar('='); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertShowing("Local_MyEvent;"); } } @@ -81,7 +81,7 @@ void Foo() using (var testState = EventHookupTestState.CreateTestState(markup)) { testState.SendTypeChar('='); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertShowing("Cfield_MyEvent;"); } } @@ -101,12 +101,12 @@ void Foo() using (var testState = EventHookupTestState.CreateTestState(markup)) { testState.SendTypeChar('='); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertNotShowing(); // Make sure that sending the tab works correctly. Note the 4 spaces after the += testState.SendTab(); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); var expectedCode = @" class C { @@ -142,7 +142,7 @@ private void C_MyEvent() using (var testState = EventHookupTestState.CreateTestState(markup)) { testState.SendTypeChar('='); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertShowing("C_MyEvent1;"); } } @@ -168,7 +168,7 @@ private static void C_MyEvent() using (var testState = EventHookupTestState.CreateTestState(markup)) { testState.SendTypeChar('='); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertShowing("C_MyEvent1;"); } } @@ -190,7 +190,7 @@ void M(string[] args) using (var testState = EventHookupTestState.CreateTestState(markup)) { testState.SendTypeChar('='); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertShowing("C_MyEvent1;"); } } @@ -212,7 +212,7 @@ void Foo() using (var testState = EventHookupTestState.CreateTestState(markup)) { testState.SendTypeChar('='); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertShowing("C_MyEvent;"); } } @@ -232,11 +232,11 @@ void M() using (var testState = EventHookupTestState.CreateTestState(markup)) { testState.SendTypeChar('='); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertShowing("C_MyEvent;"); testState.SendTypeChar(' '); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertShowing("C_MyEvent;"); } } @@ -256,11 +256,11 @@ void M() using (var testState = EventHookupTestState.CreateTestState(markup)) { testState.SendTypeChar('='); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertShowing("C_MyEvent;"); testState.SendTypeChar('d'); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertNotShowing(); } } @@ -280,11 +280,11 @@ void M() using (var testState = EventHookupTestState.CreateTestState(markup)) { testState.SendTypeChar('='); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertShowing("C_MyEvent;"); testState.SendTypeChar('='); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertNotShowing(); } } @@ -304,19 +304,19 @@ void M() using (var testState = EventHookupTestState.CreateTestState(markup)) { testState.SendTypeChar('='); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertShowing("C_MyEvent;"); testState.SendTypeChar(' '); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertShowing("C_MyEvent;"); testState.SendLeftKey(); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertShowing("C_MyEvent;"); testState.SendLeftKey(); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertNotShowing(); } } @@ -336,15 +336,15 @@ void M() using (var testState = EventHookupTestState.CreateTestState(markup)) { testState.SendTypeChar('='); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertShowing("C_MyEvent;"); testState.SendTypeChar(' '); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertShowing("C_MyEvent;"); testState.SendBackspace(); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertNotShowing(); } } @@ -371,7 +371,7 @@ private void C_MyEvent() { testState.SendTypeChar('='); testState.SendTab(); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); var expectedCode = @" class C @@ -419,7 +419,7 @@ private void C_MyEvent() { testState.SendTypeChar('='); testState.SendTab(); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); var expectedCode = @" class C @@ -465,7 +465,7 @@ private void Foo(Action a) { testState.SendTypeChar('='); testState.SendTab(); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); var expectedCode = @" class C @@ -502,7 +502,7 @@ class C { testState.SendTypeChar('='); testState.SendTab(); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); var expectedCode = @" class C @@ -535,7 +535,7 @@ class C { testState.SendTypeChar('='); testState.SendTab(); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); var expectedCode = @" class C @@ -570,7 +570,7 @@ void M() { testState.SendTypeChar('='); testState.SendTab(); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); var expectedCode = @" class C @@ -617,7 +617,7 @@ private void C_MyEvent() } testState.SendTab(); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); var expectedCode = @" class C @@ -663,7 +663,7 @@ void M() testState.SendTypeChar('z'); testState.ReleaseEventHookupCheckMutex(); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertNotShowing(); } } @@ -689,7 +689,7 @@ void M() // tab releases the mutex testState.SendTab(); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertNotShowing(); var expectedCode = @" @@ -731,7 +731,7 @@ void M() testState.SendLeftKey(); testState.ReleaseEventHookupCheckMutex(); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertNotShowing(); } } @@ -759,7 +759,7 @@ private void C_MyEvent() using (var testState = EventHookupTestState.CreateTestState(markup)) { testState.SendTypeChar('='); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertShowing("C_MyEvent1;"); } } @@ -783,7 +783,7 @@ void Main(string[] args) using (var testState = EventHookupTestState.CreateTestState(markup)) { testState.SendTypeChar('='); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertShowing("Console_CancelKeyPress1;"); } } @@ -804,7 +804,7 @@ void M(int C_MyEvent) using (var testState = EventHookupTestState.CreateTestState(markup)) { testState.SendTypeChar('='); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertShowing("C_MyEvent1;"); } } @@ -827,7 +827,7 @@ void M() { testState.SendTypeChar('='); testState.SendTab(); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); var expectedCode = @" class C @@ -865,7 +865,7 @@ void M() { testState.SendTypeChar('='); testState.SendTab(); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); testState.AssertNotShowing(); } } @@ -896,7 +896,7 @@ void Method() { testState.SendTypeChar('='); testState.SendTab(); - await testState.WaitForAsynchronousOperationsAsync().ConfigureAwait(true); + await testState.WaitForAsynchronousOperationsAsync(); var expectedCode = @" namespace Scenarios diff --git a/src/EditorFeatures/CSharpTest/Squiggles/ErrorSquiggleProducerTests.cs b/src/EditorFeatures/CSharpTest/Squiggles/ErrorSquiggleProducerTests.cs index 85a123f0046db636418d2df87d8be05b573815eb..892b008b281ff8db64b31a14f23f2b530abb2afd 100644 --- a/src/EditorFeatures/CSharpTest/Squiggles/ErrorSquiggleProducerTests.cs +++ b/src/EditorFeatures/CSharpTest/Squiggles/ErrorSquiggleProducerTests.cs @@ -27,7 +27,7 @@ public class ErrorSquiggleProducerTests : AbstractSquiggleProducerTests [WpfFact, Trait(Traits.Feature, Traits.Features.ErrorSquiggles)] public async Task ErrorTagGeneratedForError() { - var spans = await GetErrorSpans("class C {").ConfigureAwait(true); + var spans = await GetErrorSpans("class C {"); Assert.Equal(1, spans.Count()); var firstSpan = spans.First(); @@ -37,7 +37,7 @@ public async Task ErrorTagGeneratedForError() [WpfFact, Trait(Traits.Feature, Traits.Features.ErrorSquiggles)] public async Task ErrorTagGeneratedForWarning() { - var spans = await GetErrorSpans("class C { long x = 5l; }").ConfigureAwait(true); + var spans = await GetErrorSpans("class C { long x = 5l; }"); Assert.Equal(1, spans.Count()); Assert.Equal(PredefinedErrorTypeNames.Warning, spans.First().Tag.ErrorType); } @@ -63,7 +63,7 @@ void Test() using (var workspace = TestWorkspaceFactory.CreateWorkspace(workspaceXml)) { - var spans = await GetErrorSpans(workspace).ConfigureAwait(true); + var spans = await GetErrorSpans(workspace); Assert.Equal(1, spans.Count()); Assert.Equal(PredefinedErrorTypeNames.SyntaxError, spans.First().Tag.ErrorType); @@ -110,7 +110,7 @@ void Test() }; var spans = - (await GetErrorSpans(workspace, analyzerMap).ConfigureAwait(true)) + (await GetErrorSpans(workspace, analyzerMap)) .OrderBy(s => s.Span.Span.Start).ToImmutableArray(); Assert.Equal(3, spans.Length); @@ -138,14 +138,14 @@ void Test() [WpfFact, Trait(Traits.Feature, Traits.Features.ErrorSquiggles)] public async Task ErrorDoesNotCrashPastEOF() { - var spans = await GetErrorSpans("class C { int x =").ConfigureAwait(true); + var spans = await GetErrorSpans("class C { int x ="); Assert.Equal(3, spans.Count()); } [WpfFact, Trait(Traits.Feature, Traits.Features.ErrorSquiggles)] public async Task SemanticErrorReported() { - var spans = await GetErrorSpans("class C : Bar { }").ConfigureAwait(true); + var spans = await GetErrorSpans("class C : Bar { }"); Assert.Equal(1, spans.Count()); var firstSpan = spans.First(); @@ -162,7 +162,7 @@ public async Task TestNoErrorsAfterDocumentRemoved() var tagger = wrapper.TaggerProvider.CreateTagger(workspace.Documents.First().GetTextBuffer()); using (var disposable = tagger as IDisposable) { - await wrapper.WaitForTags().ConfigureAwait(true); + await wrapper.WaitForTags(); var snapshot = workspace.Documents.First().GetTextBuffer().CurrentSnapshot; var spans = tagger.GetTags(snapshot.GetSnapshotSpanCollection()).ToList(); @@ -174,7 +174,7 @@ public async Task TestNoErrorsAfterDocumentRemoved() // Now remove the document. workspace.CloseDocument(workspace.Documents.First().Id); workspace.OnDocumentRemoved(workspace.Documents.First().Id); - await wrapper.WaitForTags().ConfigureAwait(true); + await wrapper.WaitForTags(); spans = tagger.GetTags(snapshot.GetSnapshotSpanCollection()).ToList(); // And we should have no errors for this document. @@ -192,7 +192,7 @@ public async Task TestNoErrorsAfterProjectRemoved() var tagger = wrapper.TaggerProvider.CreateTagger(workspace.Documents.First().GetTextBuffer()); using (var disposable = tagger as IDisposable) { - await wrapper.WaitForTags().ConfigureAwait(true); + await wrapper.WaitForTags(); var snapshot = workspace.Documents.First().GetTextBuffer().CurrentSnapshot; var spans = tagger.GetTags(snapshot.GetSnapshotSpanCollection()).ToList(); @@ -205,7 +205,7 @@ public async Task TestNoErrorsAfterProjectRemoved() workspace.CloseDocument(workspace.Documents.First().Id); workspace.OnDocumentRemoved(workspace.Documents.First().Id); workspace.OnProjectRemoved(workspace.Projects.First().Id); - await wrapper.WaitForTags().ConfigureAwait(true); + await wrapper.WaitForTags(); spans = tagger.GetTags(snapshot.GetSnapshotSpanCollection()).ToList(); // And we should have no errors for this document. @@ -238,7 +238,7 @@ class Test CreateDiagnosticData(workspace, document, new TextSpan(0, 0)), CreateDiagnosticData(workspace, document, new TextSpan(0, 1)))); - var spans = await GetErrorsFromUpdateSource(workspace, document, updateArgs).ConfigureAwait(true); + var spans = await GetErrorsFromUpdateSource(workspace, document, updateArgs); Assert.Equal(1, spans.Count()); var first = spans.First(); @@ -271,7 +271,7 @@ class Test CreateDiagnosticData(workspace, document, new TextSpan(0, 0)), CreateDiagnosticData(workspace, document, new TextSpan(0, 1)))); - var spans = await GetErrorsFromUpdateSource(workspace, document, updateArgs).ConfigureAwait(true); + var spans = await GetErrorsFromUpdateSource(workspace, document, updateArgs); Assert.Equal(2, spans.Count()); var first = spans.First(); @@ -293,7 +293,7 @@ private static async Task>> GetErrorSpans(params { using (var workspace = CSharpWorkspaceFactory.CreateWorkspaceFromLines(content)) { - return await GetErrorSpans(workspace).ConfigureAwait(true); + return await GetErrorSpans(workspace); } } } diff --git a/src/EditorFeatures/CSharpTest/Workspaces/WorkspaceTests.cs b/src/EditorFeatures/CSharpTest/Workspaces/WorkspaceTests.cs index 4a2f237688d8de884ad09f40b82cc9f1be43b716..df4d42271c5654eb1a9d4e5dec06d2ad8fa08395 100644 --- a/src/EditorFeatures/CSharpTest/Workspaces/WorkspaceTests.cs +++ b/src/EditorFeatures/CSharpTest/Workspaces/WorkspaceTests.cs @@ -30,7 +30,7 @@ private static async Task WaitForWorkspaceOperationsToComplete(TestWorkspace wor var workspaceWaiter = workspace.ExportProvider .GetExports() .First(l => l.Metadata.FeatureName == FeatureAttribute.Workspace).Value as IAsynchronousOperationWaiter; - await workspaceWaiter.CreateWaitTask().ConfigureAwait(true); + await workspaceWaiter.CreateWaitTask(); } [WpfFact] @@ -42,7 +42,7 @@ public async Task TestEmptySolutionUpdateDoesNotFireEvents() workspace.AddTestProject(project); // wait for all previous operations to complete - await WaitForWorkspaceOperationsToComplete(workspace).ConfigureAwait(true); + await WaitForWorkspaceOperationsToComplete(workspace); var solution = workspace.CurrentSolution; bool workspaceChanged = false; @@ -53,7 +53,7 @@ public async Task TestEmptySolutionUpdateDoesNotFireEvents() workspace.OnParseOptionsChanged(project.Id, project.ParseOptions); // wait for any new outstanding operations to complete (there shouldn't be any) - await WaitForWorkspaceOperationsToComplete(workspace).ConfigureAwait(true); + await WaitForWorkspaceOperationsToComplete(workspace); // same solution instance == nothing changed Assert.Equal(solution, workspace.CurrentSolution); @@ -486,7 +486,7 @@ public async Task TestGetCompilationOnCrossLanguageDependentProjectChanged() // this solution should have the change var solutionZ = workspace.CurrentSolution; var docZ = solutionZ.GetDocument(document1.Id); - var docZText = await docZ.GetTextAsync().ConfigureAwait(true); + var docZText = await docZ.GetTextAsync(); var compilation2Z = solutionZ.GetProject(id2).GetCompilationAsync().Result; var classDz = compilation2Z.SourceModule.GlobalNamespace.GetTypeMembers("D").Single(); @@ -660,14 +660,14 @@ public async Task TestApplyChangesWithDocumentTextUpdated() workspace.OnDocumentOpened(document.Id, document.GetOpenTextContainer()); // prove the document has the correct text - Assert.Equal(startText, (await workspace.CurrentSolution.GetDocument(document.Id).GetTextAsync().ConfigureAwait(true)).ToString()); + Assert.Equal(startText, (await workspace.CurrentSolution.GetDocument(document.Id).GetTextAsync()).ToString()); // fork the solution to introduce a change. var oldSolution = workspace.CurrentSolution; var newSolution = oldSolution.WithDocumentText(document.Id, SourceText.From(newText)); // prove that current document text is unchanged - Assert.Equal(startText, (await workspace.CurrentSolution.GetDocument(document.Id).GetTextAsync().ConfigureAwait(true)).ToString()); + Assert.Equal(startText, (await workspace.CurrentSolution.GetDocument(document.Id).GetTextAsync()).ToString()); // prove buffer is unchanged too Assert.Equal(startText, buffer.CurrentSnapshot.GetText()); @@ -759,7 +759,7 @@ public async Task TestDocumentEvents() workspace.CloseDocument(document.Id); // Wait for all workspace tasks to finish. After this is finished executing, all handlers should have been notified. - await WaitForWorkspaceOperationsToComplete(workspace).ConfigureAwait(true); + await WaitForWorkspaceOperationsToComplete(workspace); // Wait to receive signal that events have fired. Assert.True(openWaiter.WaitForEventToFire(longEventTimeout), @@ -777,7 +777,7 @@ public async Task TestDocumentEvents() workspace.CloseDocument(document.Id); // Wait for all workspace tasks to finish. After this is finished executing, all handlers should have been notified. - await WaitForWorkspaceOperationsToComplete(workspace).ConfigureAwait(true); + await WaitForWorkspaceOperationsToComplete(workspace); // Verifying that an event has not been called is difficult to prove. // All events should have already been called so we wait 5 seconds and then assume the event handler was removed correctly. @@ -814,7 +814,7 @@ public async Task TestAdditionalFile_Properties() var additionalDocument = project.GetAdditionalDocument(additionalDoc.Id); - Assert.Equal("some text", (await additionalDocument.GetTextAsync().ConfigureAwait(true)).ToString()); + Assert.Equal("some text", (await additionalDocument.GetTextAsync()).ToString()); } } @@ -834,7 +834,7 @@ public async Task TestAdditionalFile_DocumentChanged() workspace.OnAdditionalDocumentOpened(additionalDoc.Id, additionalDoc.GetOpenTextContainer()); var project = workspace.CurrentSolution.Projects.Single(); - var oldVersion = await project.GetSemanticVersionAsync().ConfigureAwait(true); + var oldVersion = await project.GetSemanticVersionAsync(); // fork the solution to introduce a change. var oldSolution = workspace.CurrentSolution; @@ -847,8 +847,8 @@ public async Task TestAdditionalFile_DocumentChanged() Assert.Equal(newText, buffer.CurrentSnapshot.GetText()); // Text changes are considered top level changes and they change the project's semantic version. - Assert.Equal(await doc.GetTextVersionAsync().ConfigureAwait(true), await doc.GetTopLevelChangeTextVersionAsync().ConfigureAwait(true)); - Assert.NotEqual(oldVersion, await doc.Project.GetSemanticVersionAsync().ConfigureAwait(true)); + Assert.Equal(await doc.GetTextVersionAsync(), await doc.GetTopLevelChangeTextVersionAsync()); + Assert.NotEqual(oldVersion, await doc.Project.GetSemanticVersionAsync()); } } @@ -865,8 +865,8 @@ public async Task TestAdditionalFile_OpenClose() workspace.AddTestProject(project1); var buffer = additionalDoc.GetTextBuffer(); var doc = workspace.CurrentSolution.GetAdditionalDocument(additionalDoc.Id); - var text = await doc.GetTextAsync(CancellationToken.None).ConfigureAwait(true); - var version = await doc.GetTextVersionAsync(CancellationToken.None).ConfigureAwait(true); + var text = await doc.GetTextAsync(CancellationToken.None); + var version = await doc.GetTextVersionAsync(CancellationToken.None); workspace.OnAdditionalDocumentOpened(additionalDoc.Id, additionalDoc.GetOpenTextContainer());