diff --git a/Compilers.sln b/Compilers.sln index f64f8fed7d47a..51915cf42f962 100644 --- a/Compilers.sln +++ b/Compilers.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27102.0 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29731.156 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.UnitTests", "src\Compilers\Core\CodeAnalysisTest\Microsoft.CodeAnalysis.UnitTests.csproj", "{A4C99B85-765C-4C65-9C2A-BB609AAB09E6}" EndProject @@ -118,26 +118,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.CSha EndProject Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "src\Workspaces\VisualBasic\Portable\Microsoft.CodeAnalysis.VisualBasic.Workspaces.vbproj", "{57CA988D-F010-4BF2-9A2E-07D6DCD2FF2C}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CodeStyle", "CodeStyle", "{B20208C3-D3A6-4020-A274-6BE3786D29FB}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.CodeStyle", "src\CodeStyle\Core\Analyzers\Microsoft.CodeAnalysis.CodeStyle.csproj", "{275812EE-DEDB-4232-9439-91C9757D2AE4}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.CodeStyle.Fixes", "src\CodeStyle\Core\CodeFixes\Microsoft.CodeAnalysis.CodeStyle.Fixes.csproj", "{5FF1E493-69CC-4D0B-83F2-039F469A04E1}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.CodeStyle.UnitTests", "src\CodeStyle\Core\Tests\Microsoft.CodeAnalysis.CodeStyle.UnitTests.csproj", "{9FF1205F-1D7C-4EE4-B038-3456FE6EBEAF}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.CSharp.CodeStyle", "src\CodeStyle\CSharp\Analyzers\Microsoft.CodeAnalysis.CSharp.CodeStyle.csproj", "{AA87BFED-089A-4096-B8D5-690BDC7D5B24}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes", "src\CodeStyle\CSharp\CodeFixes\Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes.csproj", "{A07ABCF5-BC43-4EE9-8FD8-B2D77FD54D73}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests", "src\CodeStyle\CSharp\Tests\Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests.csproj", "{5018D049-5870-465A-889B-C742CE1E31CB}" -EndProject -Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Microsoft.CodeAnalysis.VisualBasic.CodeStyle", "src\CodeStyle\VisualBasic\Analyzers\Microsoft.CodeAnalysis.VisualBasic.CodeStyle.vbproj", "{2531A8C4-97DD-47BC-A79C-B7846051E137}" -EndProject -Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes", "src\CodeStyle\VisualBasic\CodeFixes\Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes.vbproj", "{0141285D-8F6C-42C7-BAF3-3C0CCD61C716}" -EndProject -Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests", "src\CodeStyle\VisualBasic\Tests\Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests.vbproj", "{E512C6C1-F085-4AD7-B0D9-E8F1A0A2A510}" -EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "CSharpAnalyzerDriver", "src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpAnalyzerDriver.shproj", "{54E08BF5-F819-404F-A18D-0AB9EA81EA04}" EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "BasicAnalyzerDriver", "src\Compilers\VisualBasic\BasicAnalyzerDriver\BasicAnalyzerDriver.shproj", "{E8F0BAA5-7327-43D1-9A51-644E81AE55F1}" @@ -162,24 +142,27 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Net.Compilers.Too EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution - src\Compilers\Core\AnalyzerDriver\AnalyzerDriver.projitems*{1ee8cad3-55f9-4d91-96b2-084641da9a6c}*SharedItemsImports = 4 - src\Dependencies\CodeAnalysis.Debugging\Microsoft.CodeAnalysis.Debugging.projitems*{1ee8cad3-55f9-4d91-96b2-084641da9a6c}*SharedItemsImports = 4 - src\Dependencies\PooledObjects\Microsoft.CodeAnalysis.PooledObjects.projitems*{1ee8cad3-55f9-4d91-96b2-084641da9a6c}*SharedItemsImports = 4 - src\Compilers\VisualBasic\BasicAnalyzerDriver\BasicAnalyzerDriver.projitems*{2523d0e6-df32-4a3e-8ae0-a19bffae2ef6}*SharedItemsImports = 4 - src\Compilers\Core\CommandLine\CommandLine.projitems*{4b45ca0c-03a0-400f-b454-3d4bcb16af38}*SharedItemsImports = 4 + src\Compilers\Core\AnalyzerDriver\AnalyzerDriver.projitems*{1ee8cad3-55f9-4d91-96b2-084641da9a6c}*SharedItemsImports = 5 + src\Dependencies\CodeAnalysis.Debugging\Microsoft.CodeAnalysis.Debugging.projitems*{1ee8cad3-55f9-4d91-96b2-084641da9a6c}*SharedItemsImports = 5 + src\Dependencies\PooledObjects\Microsoft.CodeAnalysis.PooledObjects.projitems*{1ee8cad3-55f9-4d91-96b2-084641da9a6c}*SharedItemsImports = 5 + src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CSharpCompilerExtensions.projitems*{21b239d0-d144-430f-a394-c066d58ee267}*SharedItemsImports = 5 + src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CSharpWorkspaceExtensions.projitems*{21b239d0-d144-430f-a394-c066d58ee267}*SharedItemsImports = 5 + src\Compilers\VisualBasic\BasicAnalyzerDriver\BasicAnalyzerDriver.projitems*{2523d0e6-df32-4a3e-8ae0-a19bffae2ef6}*SharedItemsImports = 5 + src\Compilers\Core\CommandLine\CommandLine.projitems*{4b45ca0c-03a0-400f-b454-3d4bcb16af38}*SharedItemsImports = 5 src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpAnalyzerDriver.projitems*{54e08bf5-f819-404f-a18d-0ab9ea81ea04}*SharedItemsImports = 13 - src\Dependencies\PooledObjects\Microsoft.CodeAnalysis.PooledObjects.projitems*{5f8d2414-064a-4b3a-9b42-8e2a04246be5}*SharedItemsImports = 4 - src\Compilers\Core\CommandLine\CommandLine.projitems*{7ad4fe65-9a30-41a6-8004-aa8f89bcb7f3}*SharedItemsImports = 4 - src\Compilers\Core\CommandLine\CommandLine.projitems*{9508f118-f62e-4c16-a6f4-7c3b56e166ad}*SharedItemsImports = 4 - src\Compilers\Server\ServerShared\ServerShared.projitems*{9508f118-f62e-4c16-a6f4-7c3b56e166ad}*SharedItemsImports = 4 + src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\VisualBasicCompilerExtensions.projitems*{57ca988d-f010-4bf2-9a2e-07d6dcd2ff2c}*SharedItemsImports = 5 + src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\VisualBasicWorkspaceExtensions.projitems*{57ca988d-f010-4bf2-9a2e-07d6dcd2ff2c}*SharedItemsImports = 5 + src\Dependencies\PooledObjects\Microsoft.CodeAnalysis.PooledObjects.projitems*{5f8d2414-064a-4b3a-9b42-8e2a04246be5}*SharedItemsImports = 5 + src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CompilerExtensions.projitems*{5f8d2414-064a-4b3a-9b42-8e2a04246be5}*SharedItemsImports = 5 + src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\WorkspaceExtensions.projitems*{5f8d2414-064a-4b3a-9b42-8e2a04246be5}*SharedItemsImports = 5 + src\Compilers\Core\CommandLine\CommandLine.projitems*{7ad4fe65-9a30-41a6-8004-aa8f89bcb7f3}*SharedItemsImports = 5 + src\Compilers\Core\CommandLine\CommandLine.projitems*{9508f118-f62e-4c16-a6f4-7c3b56e166ad}*SharedItemsImports = 5 src\Compilers\Core\CommandLine\CommandLine.projitems*{ad6f474e-e6d4-4217-91f3-b7af1be31ccc}*SharedItemsImports = 13 - src\Dependencies\CodeAnalysis.Debugging\Microsoft.CodeAnalysis.Debugging.projitems*{afde6bea-5038-4a4a-a88e-dbd2e4088eed}*SharedItemsImports = 4 - src\Dependencies\PooledObjects\Microsoft.CodeAnalysis.PooledObjects.projitems*{afde6bea-5038-4a4a-a88e-dbd2e4088eed}*SharedItemsImports = 4 - src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpAnalyzerDriver.projitems*{b501a547-c911-4a05-ac6e-274a50dff30e}*SharedItemsImports = 4 + src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpAnalyzerDriver.projitems*{b501a547-c911-4a05-ac6e-274a50dff30e}*SharedItemsImports = 5 src\Dependencies\PooledObjects\Microsoft.CodeAnalysis.PooledObjects.projitems*{c1930979-c824-496b-a630-70f5369a636f}*SharedItemsImports = 13 src\Compilers\Core\AnalyzerDriver\AnalyzerDriver.projitems*{d0bc9be7-24f6-40ca-8dc6-fcb93bd44b34}*SharedItemsImports = 13 src\Dependencies\CodeAnalysis.Debugging\Microsoft.CodeAnalysis.Debugging.projitems*{d73adf7d-2c1c-42ae-b2ab-edc9497e4b71}*SharedItemsImports = 13 - src\Compilers\Core\CommandLine\CommandLine.projitems*{e58ee9d7-1239-4961-a0c1-f9ec3952c4c1}*SharedItemsImports = 4 + src\Compilers\Core\CommandLine\CommandLine.projitems*{e58ee9d7-1239-4961-a0c1-f9ec3952c4c1}*SharedItemsImports = 5 src\Compilers\VisualBasic\BasicAnalyzerDriver\BasicAnalyzerDriver.projitems*{e8f0baa5-7327-43d1-9a51-644e81ae55f1}*SharedItemsImports = 13 EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -367,42 +350,6 @@ Global {57CA988D-F010-4BF2-9A2E-07D6DCD2FF2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {57CA988D-F010-4BF2-9A2E-07D6DCD2FF2C}.Release|Any CPU.ActiveCfg = Release|Any CPU {57CA988D-F010-4BF2-9A2E-07D6DCD2FF2C}.Release|Any CPU.Build.0 = Release|Any CPU - {275812EE-DEDB-4232-9439-91C9757D2AE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {275812EE-DEDB-4232-9439-91C9757D2AE4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {275812EE-DEDB-4232-9439-91C9757D2AE4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {275812EE-DEDB-4232-9439-91C9757D2AE4}.Release|Any CPU.Build.0 = Release|Any CPU - {5FF1E493-69CC-4D0B-83F2-039F469A04E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5FF1E493-69CC-4D0B-83F2-039F469A04E1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5FF1E493-69CC-4D0B-83F2-039F469A04E1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5FF1E493-69CC-4D0B-83F2-039F469A04E1}.Release|Any CPU.Build.0 = Release|Any CPU - {9FF1205F-1D7C-4EE4-B038-3456FE6EBEAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9FF1205F-1D7C-4EE4-B038-3456FE6EBEAF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9FF1205F-1D7C-4EE4-B038-3456FE6EBEAF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9FF1205F-1D7C-4EE4-B038-3456FE6EBEAF}.Release|Any CPU.Build.0 = Release|Any CPU - {AA87BFED-089A-4096-B8D5-690BDC7D5B24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AA87BFED-089A-4096-B8D5-690BDC7D5B24}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AA87BFED-089A-4096-B8D5-690BDC7D5B24}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AA87BFED-089A-4096-B8D5-690BDC7D5B24}.Release|Any CPU.Build.0 = Release|Any CPU - {A07ABCF5-BC43-4EE9-8FD8-B2D77FD54D73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A07ABCF5-BC43-4EE9-8FD8-B2D77FD54D73}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A07ABCF5-BC43-4EE9-8FD8-B2D77FD54D73}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A07ABCF5-BC43-4EE9-8FD8-B2D77FD54D73}.Release|Any CPU.Build.0 = Release|Any CPU - {5018D049-5870-465A-889B-C742CE1E31CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5018D049-5870-465A-889B-C742CE1E31CB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5018D049-5870-465A-889B-C742CE1E31CB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5018D049-5870-465A-889B-C742CE1E31CB}.Release|Any CPU.Build.0 = Release|Any CPU - {2531A8C4-97DD-47BC-A79C-B7846051E137}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2531A8C4-97DD-47BC-A79C-B7846051E137}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2531A8C4-97DD-47BC-A79C-B7846051E137}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2531A8C4-97DD-47BC-A79C-B7846051E137}.Release|Any CPU.Build.0 = Release|Any CPU - {0141285D-8F6C-42C7-BAF3-3C0CCD61C716}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0141285D-8F6C-42C7-BAF3-3C0CCD61C716}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0141285D-8F6C-42C7-BAF3-3C0CCD61C716}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0141285D-8F6C-42C7-BAF3-3C0CCD61C716}.Release|Any CPU.Build.0 = Release|Any CPU - {E512C6C1-F085-4AD7-B0D9-E8F1A0A2A510}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E512C6C1-F085-4AD7-B0D9-E8F1A0A2A510}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E512C6C1-F085-4AD7-B0D9-E8F1A0A2A510}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E512C6C1-F085-4AD7-B0D9-E8F1A0A2A510}.Release|Any CPU.Build.0 = Release|Any CPU {15FEBD1B-55CE-4EBD-85E3-04898260A25B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {15FEBD1B-55CE-4EBD-85E3-04898260A25B}.Debug|Any CPU.Build.0 = Debug|Any CPU {15FEBD1B-55CE-4EBD-85E3-04898260A25B}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -489,15 +436,6 @@ Global {5F8D2414-064A-4B3A-9B42-8E2A04246BE5} = {D9591377-7868-4D64-9314-83E0C92A871B} {21B239D0-D144-430F-A394-C066D58EE267} = {D9591377-7868-4D64-9314-83E0C92A871B} {57CA988D-F010-4BF2-9A2E-07D6DCD2FF2C} = {D9591377-7868-4D64-9314-83E0C92A871B} - {275812EE-DEDB-4232-9439-91C9757D2AE4} = {B20208C3-D3A6-4020-A274-6BE3786D29FB} - {5FF1E493-69CC-4D0B-83F2-039F469A04E1} = {B20208C3-D3A6-4020-A274-6BE3786D29FB} - {9FF1205F-1D7C-4EE4-B038-3456FE6EBEAF} = {B20208C3-D3A6-4020-A274-6BE3786D29FB} - {AA87BFED-089A-4096-B8D5-690BDC7D5B24} = {B20208C3-D3A6-4020-A274-6BE3786D29FB} - {A07ABCF5-BC43-4EE9-8FD8-B2D77FD54D73} = {B20208C3-D3A6-4020-A274-6BE3786D29FB} - {5018D049-5870-465A-889B-C742CE1E31CB} = {B20208C3-D3A6-4020-A274-6BE3786D29FB} - {2531A8C4-97DD-47BC-A79C-B7846051E137} = {B20208C3-D3A6-4020-A274-6BE3786D29FB} - {0141285D-8F6C-42C7-BAF3-3C0CCD61C716} = {B20208C3-D3A6-4020-A274-6BE3786D29FB} - {E512C6C1-F085-4AD7-B0D9-E8F1A0A2A510} = {B20208C3-D3A6-4020-A274-6BE3786D29FB} {54E08BF5-F819-404F-A18D-0AB9EA81EA04} = {32A48625-F0AD-419D-828B-A50BDABA38EA} {E8F0BAA5-7327-43D1-9A51-644E81AE55F1} = {C65C6143-BED3-46E6-869E-9F0BE6E84C37} {15FEBD1B-55CE-4EBD-85E3-04898260A25B} = {274B96B7-F815-47E3-9CA4-4024A57A478F} diff --git a/Roslyn.sln b/Roslyn.sln index d2fba318f3cdc..006dc5ba17a8f 100644 --- a/Roslyn.sln +++ b/Roslyn.sln @@ -330,7 +330,7 @@ Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Microsoft.CodeAnalysis.Visu EndProject Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes", "src\CodeStyle\VisualBasic\CodeFixes\Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes.vbproj", "{0141285D-8F6C-42C7-BAF3-3C0CCD61C716}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.CodeStyle.UnitTests", "src\CodeStyle\Core\Tests\Microsoft.CodeAnalysis.CodeStyle.UnitTests.csproj", "{9FF1205F-1D7C-4EE4-B038-3456FE6EBEAF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities", "src\CodeStyle\Core\Tests\Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities.csproj", "{9FF1205F-1D7C-4EE4-B038-3456FE6EBEAF}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests", "src\CodeStyle\CSharp\Tests\Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests.csproj", "{5018D049-5870-465A-889B-C742CE1E31CB}" EndProject @@ -458,9 +458,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Compiler", "Compiler", "{7A EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Workspace", "Workspace", "{9C1BE25C-5926-4E56-84AE-D2242CB0627E}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities", "src\EditorFeatures\DiagnosticsTestUtilities\Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities.csproj", "{1C2DAB75-D024-4C04-9F3F-B2F881D805EE}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution src\Analyzers\VisualBasic\CodeFixes\VisualBasicCodeFixes.projitems*{0141285d-8f6c-42c7-baf3-3c0ccd61c716}*SharedItemsImports = 5 + src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\VisualBasicWorkspaceExtensions.projitems*{0141285d-8f6c-42c7-baf3-3c0ccd61c716}*SharedItemsImports = 5 src\Analyzers\VisualBasic\Tests\VisualBasicAnalyzers.UnitTests.projitems*{0be66736-cdaa-4989-88b1-b3f46ebdca4a}*SharedItemsImports = 5 src\Analyzers\Core\CodeFixes\CodeFixes.projitems*{1b6c4a1a-413b-41fb-9f85-5c09118e541b}*SharedItemsImports = 13 src\Compilers\Core\AnalyzerDriver\AnalyzerDriver.projitems*{1ee8cad3-55f9-4d91-96b2-084641da9a6c}*SharedItemsImports = 5 @@ -470,6 +473,7 @@ Global src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CSharpWorkspaceExtensions.projitems*{21b239d0-d144-430f-a394-c066d58ee267}*SharedItemsImports = 5 src\Compilers\VisualBasic\BasicAnalyzerDriver\BasicAnalyzerDriver.projitems*{2523d0e6-df32-4a3e-8ae0-a19bffae2ef6}*SharedItemsImports = 5 src\Analyzers\VisualBasic\Analyzers\VisualBasicAnalyzers.projitems*{2531a8c4-97dd-47bc-a79c-b7846051e137}*SharedItemsImports = 5 + src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\VisualBasicCompilerExtensions.projitems*{2531a8c4-97dd-47bc-a79c-b7846051e137}*SharedItemsImports = 5 src\Analyzers\Core\Analyzers\Analyzers.projitems*{275812ee-dedb-4232-9439-91c9757d2ae4}*SharedItemsImports = 5 src\Dependencies\PooledObjects\Microsoft.CodeAnalysis.PooledObjects.projitems*{275812ee-dedb-4232-9439-91c9757d2ae4}*SharedItemsImports = 5 src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CompilerExtensions.projitems*{275812ee-dedb-4232-9439-91c9757d2ae4}*SharedItemsImports = 5 @@ -502,10 +506,12 @@ Global src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\WorkspaceExtensions.projitems*{99f594b1-3916-471d-a761-a6731fc50e9a}*SharedItemsImports = 13 src\Analyzers\VisualBasic\CodeFixes\VisualBasicCodeFixes.projitems*{9f9ccc78-7487-4127-9d46-db23e501f001}*SharedItemsImports = 13 src\Analyzers\CSharp\CodeFixes\CSharpCodeFixes.projitems*{a07abcf5-bc43-4ee9-8fd8-b2d77fd54d73}*SharedItemsImports = 5 + src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CSharpWorkspaceExtensions.projitems*{a07abcf5-bc43-4ee9-8fd8-b2d77fd54d73}*SharedItemsImports = 5 src\Analyzers\VisualBasic\Analyzers\VisualBasicAnalyzers.projitems*{a1bcd0ce-6c2f-4f8c-9a48-d9d93928e26d}*SharedItemsImports = 5 src\Analyzers\VisualBasic\CodeFixes\VisualBasicCodeFixes.projitems*{a1bcd0ce-6c2f-4f8c-9a48-d9d93928e26d}*SharedItemsImports = 5 src\Compilers\VisualBasic\BasicAnalyzerDriver\BasicAnalyzerDriver.projitems*{a1bcd0ce-6c2f-4f8c-9a48-d9d93928e26d}*SharedItemsImports = 5 src\Analyzers\CSharp\Analyzers\CSharpAnalyzers.projitems*{aa87bfed-089a-4096-b8d5-690bdc7d5b24}*SharedItemsImports = 5 + src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CSharpCompilerExtensions.projitems*{aa87bfed-089a-4096-b8d5-690bdc7d5b24}*SharedItemsImports = 5 src\ExpressionEvaluator\Core\Source\ResultProvider\ResultProvider.projitems*{abdbac1e-350e-4dc3-bb45-3504404545ee}*SharedItemsImports = 5 src\Analyzers\CSharp\Tests\CSharpAnalyzers.UnitTests.projitems*{ac2bcefb-9298-4621-ac48-1ff5e639e48d}*SharedItemsImports = 5 src\ExpressionEvaluator\VisualBasic\Source\ResultProvider\BasicResultProvider.projitems*{ace53515-482c-4c6a-e2d2-4242a687dfee}*SharedItemsImports = 5 @@ -1197,6 +1203,10 @@ Global {D55FB2BD-CC9E-454B-9654-94AF5D910BF7}.Debug|Any CPU.Build.0 = Debug|Any CPU {D55FB2BD-CC9E-454B-9654-94AF5D910BF7}.Release|Any CPU.ActiveCfg = Release|Any CPU {D55FB2BD-CC9E-454B-9654-94AF5D910BF7}.Release|Any CPU.Build.0 = Release|Any CPU + {1C2DAB75-D024-4C04-9F3F-B2F881D805EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1C2DAB75-D024-4C04-9F3F-B2F881D805EE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1C2DAB75-D024-4C04-9F3F-B2F881D805EE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1C2DAB75-D024-4C04-9F3F-B2F881D805EE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1410,6 +1420,7 @@ Global {DF17AF27-AA02-482B-8946-5CA8A50D5A2B} = {55A62CFA-1155-46F1-ADF3-BEEE51B58AB5} {7A69EA65-4411-4CD0-B439-035E720C1BD3} = {DF17AF27-AA02-482B-8946-5CA8A50D5A2B} {9C1BE25C-5926-4E56-84AE-D2242CB0627E} = {DF17AF27-AA02-482B-8946-5CA8A50D5A2B} + {1C2DAB75-D024-4C04-9F3F-B2F881D805EE} = {EE97CB90-33BB-4F3A-9B3D-69375DEC6AC6} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {604E6B91-7BC0-4126-AE07-D4D2FEFC3D29} diff --git a/src/Analyzers/CSharp/Analyzers/CSharpAnalyzers.projitems b/src/Analyzers/CSharp/Analyzers/CSharpAnalyzers.projitems index 18ced76af3610..75cbcb90b5e1b 100644 --- a/src/Analyzers/CSharp/Analyzers/CSharpAnalyzers.projitems +++ b/src/Analyzers/CSharp/Analyzers/CSharpAnalyzers.projitems @@ -8,4 +8,18 @@ Microsoft.CodeAnalysis.CSharp.Analyzers + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/Analyzers/CSharpAnalyzersResources.resx b/src/Analyzers/CSharp/Analyzers/CSharpAnalyzersResources.resx new file mode 100644 index 0000000000000..7a3a5136e48e1 --- /dev/null +++ b/src/Analyzers/CSharp/Analyzers/CSharpAnalyzersResources.resx @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Make readonly fields writable + {Locked="readonly"} "readonly" is C# keyword and should not be localized. + + + Convert switch statement to expression + + + Use 'switch' expression + + + Use explicit type instead of 'var' + + + Use explicit type + + + use 'var' instead of explicit type + + + Use implicit type + + + Using directive is unnecessary. + + \ No newline at end of file diff --git a/src/Features/CSharp/Portable/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionConstants.cs b/src/Analyzers/CSharp/Analyzers/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionConstants.cs similarity index 100% rename from src/Features/CSharp/Portable/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionConstants.cs rename to src/Analyzers/CSharp/Analyzers/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionConstants.cs diff --git a/src/Features/CSharp/Portable/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs b/src/Analyzers/CSharp/Analyzers/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs similarity index 100% rename from src/Features/CSharp/Portable/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs rename to src/Analyzers/CSharp/Analyzers/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs diff --git a/src/Features/CSharp/Portable/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs b/src/Analyzers/CSharp/Analyzers/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs similarity index 86% rename from src/Features/CSharp/Portable/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs rename to src/Analyzers/CSharp/Analyzers/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs index 65a99d7d05f51..6479740ef837c 100644 --- a/src/Features/CSharp/Portable/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs +++ b/src/Analyzers/CSharp/Analyzers/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs @@ -6,12 +6,17 @@ using System.Globalization; using System.Linq; using Microsoft.CodeAnalysis.CodeStyle; -using Microsoft.CodeAnalysis.CSharp.CodeStyle; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; -using Microsoft.CodeAnalysis.Options; using Microsoft.CodeAnalysis.PooledObjects; +#if CODE_STYLE +using Microsoft.CodeAnalysis.CSharp.Internal.CodeStyle; +#else +using Microsoft.CodeAnalysis.CSharp.CodeStyle; +using Microsoft.CodeAnalysis.Options; +#endif + namespace Microsoft.CodeAnalysis.CSharp.ConvertSwitchStatementToExpression { using Constants = ConvertSwitchStatementToExpressionConstants; @@ -23,8 +28,8 @@ public ConvertSwitchStatementToExpressionDiagnosticAnalyzer() : base(IDEDiagnosticIds.ConvertSwitchStatementToExpressionDiagnosticId, CSharpCodeStyleOptions.PreferSwitchExpression, LanguageNames.CSharp, - new LocalizableResourceString(nameof(CSharpFeaturesResources.Convert_switch_statement_to_expression), CSharpFeaturesResources.ResourceManager, typeof(CSharpFeaturesResources)), - new LocalizableResourceString(nameof(CSharpFeaturesResources.Use_switch_expression), CSharpFeaturesResources.ResourceManager, typeof(CSharpFeaturesResources))) + new LocalizableResourceString(nameof(CSharpAnalyzersResources.Convert_switch_statement_to_expression), CSharpAnalyzersResources.ResourceManager, typeof(CSharpAnalyzersResources)), + new LocalizableResourceString(nameof(CSharpAnalyzersResources.Use_switch_expression), CSharpAnalyzersResources.ResourceManager, typeof(CSharpAnalyzersResources))) { } @@ -48,7 +53,7 @@ private void AnalyzeSyntax(SyntaxNodeAnalysisContext context) var options = context.Options; var cancellationToken = context.CancellationToken; - var optionSet = options.GetDocumentOptionSetAsync(syntaxTree, cancellationToken).GetAwaiter().GetResult(); + var optionSet = options.GetOptions(syntaxTree, cancellationToken); if (optionSet == null) { return; @@ -90,9 +95,6 @@ private void AnalyzeSyntax(SyntaxNodeAnalysisContext context) .Add(Constants.ShouldRemoveNextStatementKey, shouldRemoveNextStatement.ToString(CultureInfo.InvariantCulture)))); } - public override bool OpenFileOnly(OptionSet options) - => false; - public override DiagnosticAnalyzerCategory GetAnalyzerCategory() => DiagnosticAnalyzerCategory.SemanticSpanAnalysis; } diff --git a/src/Features/CSharp/Portable/MakeStructFieldsWritable/CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs b/src/Analyzers/CSharp/Analyzers/MakeStructFieldsWritable/CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs similarity index 93% rename from src/Features/CSharp/Portable/MakeStructFieldsWritable/CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs rename to src/Analyzers/CSharp/Analyzers/MakeStructFieldsWritable/CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs index 7f946fbdd7a47..c7f873fc7fc50 100644 --- a/src/Features/CSharp/Portable/MakeStructFieldsWritable/CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs +++ b/src/Analyzers/CSharp/Analyzers/MakeStructFieldsWritable/CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs @@ -15,8 +15,8 @@ internal sealed class CSharpMakeStructFieldsWritableDiagnosticAnalyzer : Abstrac { private static readonly DiagnosticDescriptor s_diagnosticDescriptor = CreateDescriptor( IDEDiagnosticIds.MakeStructFieldsWritable, - new LocalizableResourceString(nameof(FeaturesResources.Make_readonly_fields_writable), FeaturesResources.ResourceManager, typeof(FeaturesResources)), - new LocalizableResourceString(nameof(FeaturesResources.Make_readonly_fields_writable), FeaturesResources.ResourceManager, typeof(FeaturesResources)), + new LocalizableResourceString(nameof(CSharpAnalyzersResources.Make_readonly_fields_writable), CSharpAnalyzersResources.ResourceManager, typeof(CSharpAnalyzersResources)), + new LocalizableResourceString(nameof(CSharpAnalyzersResources.Make_readonly_fields_writable), CSharpAnalyzersResources.ResourceManager, typeof(CSharpAnalyzersResources)), isUnneccessary: false); public CSharpMakeStructFieldsWritableDiagnosticAnalyzer() diff --git a/src/Features/CSharp/Portable/RemoveUnnecessaryImports/CSharpRemoveUnnecessaryImportsDiagnosticAnalyzer.cs b/src/Analyzers/CSharp/Analyzers/RemoveUnnecessaryImports/CSharpRemoveUnnecessaryImportsDiagnosticAnalyzer.cs similarity index 90% rename from src/Features/CSharp/Portable/RemoveUnnecessaryImports/CSharpRemoveUnnecessaryImportsDiagnosticAnalyzer.cs rename to src/Analyzers/CSharp/Analyzers/RemoveUnnecessaryImports/CSharpRemoveUnnecessaryImportsDiagnosticAnalyzer.cs index 1d5cbb12455c1..690f4bc1913d5 100644 --- a/src/Features/CSharp/Portable/RemoveUnnecessaryImports/CSharpRemoveUnnecessaryImportsDiagnosticAnalyzer.cs +++ b/src/Analyzers/CSharp/Analyzers/RemoveUnnecessaryImports/CSharpRemoveUnnecessaryImportsDiagnosticAnalyzer.cs @@ -21,11 +21,11 @@ namespace Microsoft.CodeAnalysis.CSharp.RemoveUnnecessaryImports internal sealed class CSharpRemoveUnnecessaryImportsDiagnosticAnalyzer : AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer { - private static readonly LocalizableString s_TitleAndMessageFormat = - new LocalizableResourceString(nameof(CSharpFeaturesResources.Using_directive_is_unnecessary), CSharpFeaturesResources.ResourceManager, typeof(CSharpFeaturesResources)); + private static readonly LocalizableString s_titleAndMessageFormat = + new LocalizableResourceString(nameof(CSharpAnalyzersResources.Using_directive_is_unnecessary), CSharpAnalyzersResources.ResourceManager, typeof(CSharpAnalyzersResources)); protected override LocalizableString GetTitleAndMessageFormatForClassificationIdDescriptor() - => s_TitleAndMessageFormat; + => s_titleAndMessageFormat; // C# has no need to do any merging of using statements. Only VB needs to // merge import clauses to an import statement if it all the import clauses diff --git a/src/Features/CSharp/Portable/RemoveUnusedMembers/CSharpRemoveUnusedMembersDiagnosticAnalyzer.cs b/src/Analyzers/CSharp/Analyzers/RemoveUnusedMembers/CSharpRemoveUnusedMembersDiagnosticAnalyzer.cs similarity index 100% rename from src/Features/CSharp/Portable/RemoveUnusedMembers/CSharpRemoveUnusedMembersDiagnosticAnalyzer.cs rename to src/Analyzers/CSharp/Analyzers/RemoveUnusedMembers/CSharpRemoveUnusedMembersDiagnosticAnalyzer.cs diff --git a/src/Features/CSharp/Portable/Diagnostics/Analyzers/CSharpTypeStyleDiagnosticAnalyzerBase.cs b/src/Analyzers/CSharp/Analyzers/UseImplicitOrExplicitType/CSharpTypeStyleDiagnosticAnalyzerBase.cs similarity index 93% rename from src/Features/CSharp/Portable/Diagnostics/Analyzers/CSharpTypeStyleDiagnosticAnalyzerBase.cs rename to src/Analyzers/CSharp/Analyzers/UseImplicitOrExplicitType/CSharpTypeStyleDiagnosticAnalyzerBase.cs index be9422d9c60fe..5a087f869cd7b 100644 --- a/src/Features/CSharp/Portable/Diagnostics/Analyzers/CSharpTypeStyleDiagnosticAnalyzerBase.cs +++ b/src/Analyzers/CSharp/Analyzers/UseImplicitOrExplicitType/CSharpTypeStyleDiagnosticAnalyzerBase.cs @@ -4,13 +4,20 @@ using System.Collections.Immutable; using Microsoft.CodeAnalysis.CodeStyle; -using Microsoft.CodeAnalysis.CSharp.CodeStyle; using Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Utilities; using Microsoft.CodeAnalysis.Diagnostics; -using Microsoft.CodeAnalysis.Options; using Microsoft.CodeAnalysis.Text; +#if CODE_STYLE +using Microsoft.CodeAnalysis.CSharp.Internal.CodeStyle; +using Microsoft.CodeAnalysis.Internal.Options; +using OptionSet = Microsoft.CodeAnalysis.Diagnostics.AnalyzerConfigOptions; +#else +using Microsoft.CodeAnalysis.CSharp.CodeStyle; +using Microsoft.CodeAnalysis.Options; +#endif + namespace Microsoft.CodeAnalysis.CSharp.Diagnostics.TypeStyle { internal abstract partial class CSharpTypeStyleDiagnosticAnalyzerBase : @@ -50,7 +57,7 @@ private void HandleVariableDeclaration(SyntaxNodeAnalysisContext context) var options = context.Options; var syntaxTree = context.Node.SyntaxTree; var cancellationToken = context.CancellationToken; - var optionSet = options.GetDocumentOptionSetAsync(syntaxTree, cancellationToken).GetAwaiter().GetResult(); + var optionSet = options.GetOptions(syntaxTree, cancellationToken); if (optionSet == null) { return; diff --git a/src/Features/CSharp/Portable/Diagnostics/Analyzers/CSharpUseExplicitTypeDiagnosticAnalyzer.cs b/src/Analyzers/CSharp/Analyzers/UseImplicitOrExplicitType/CSharpUseExplicitTypeDiagnosticAnalyzer.cs similarity index 73% rename from src/Features/CSharp/Portable/Diagnostics/Analyzers/CSharpUseExplicitTypeDiagnosticAnalyzer.cs rename to src/Analyzers/CSharp/Analyzers/UseImplicitOrExplicitType/CSharpUseExplicitTypeDiagnosticAnalyzer.cs index 36f32c29e145d..5a8016473b58e 100644 --- a/src/Features/CSharp/Portable/Diagnostics/Analyzers/CSharpUseExplicitTypeDiagnosticAnalyzer.cs +++ b/src/Analyzers/CSharp/Analyzers/UseImplicitOrExplicitType/CSharpUseExplicitTypeDiagnosticAnalyzer.cs @@ -11,10 +11,10 @@ namespace Microsoft.CodeAnalysis.CSharp.Diagnostics.TypeStyle internal sealed class CSharpUseExplicitTypeDiagnosticAnalyzer : CSharpTypeStyleDiagnosticAnalyzerBase { private static readonly LocalizableString s_Title = - new LocalizableResourceString(nameof(CSharpFeaturesResources.Use_explicit_type), CSharpFeaturesResources.ResourceManager, typeof(CSharpFeaturesResources)); + new LocalizableResourceString(nameof(CSharpAnalyzersResources.Use_explicit_type), CSharpAnalyzersResources.ResourceManager, typeof(CSharpAnalyzersResources)); private static readonly LocalizableString s_Message = - new LocalizableResourceString(nameof(CSharpFeaturesResources.Use_explicit_type_instead_of_var), CSharpFeaturesResources.ResourceManager, typeof(CSharpFeaturesResources)); + new LocalizableResourceString(nameof(CSharpAnalyzersResources.Use_explicit_type_instead_of_var), CSharpAnalyzersResources.ResourceManager, typeof(CSharpAnalyzersResources)); protected override CSharpTypeStyleHelper Helper => CSharpUseExplicitTypeHelper.Instance; diff --git a/src/Features/CSharp/Portable/Diagnostics/Analyzers/CSharpUseImplicitTypeDiagnosticAnalyzer.cs b/src/Analyzers/CSharp/Analyzers/UseImplicitOrExplicitType/CSharpUseImplicitTypeDiagnosticAnalyzer.cs similarity index 73% rename from src/Features/CSharp/Portable/Diagnostics/Analyzers/CSharpUseImplicitTypeDiagnosticAnalyzer.cs rename to src/Analyzers/CSharp/Analyzers/UseImplicitOrExplicitType/CSharpUseImplicitTypeDiagnosticAnalyzer.cs index 61c0b5bcec2d9..ddd863b4d86e5 100644 --- a/src/Features/CSharp/Portable/Diagnostics/Analyzers/CSharpUseImplicitTypeDiagnosticAnalyzer.cs +++ b/src/Analyzers/CSharp/Analyzers/UseImplicitOrExplicitType/CSharpUseImplicitTypeDiagnosticAnalyzer.cs @@ -11,10 +11,10 @@ namespace Microsoft.CodeAnalysis.CSharp.Diagnostics.TypeStyle internal sealed class CSharpUseImplicitTypeDiagnosticAnalyzer : CSharpTypeStyleDiagnosticAnalyzerBase { private static readonly LocalizableString s_Title = - new LocalizableResourceString(nameof(CSharpFeaturesResources.Use_implicit_type), CSharpFeaturesResources.ResourceManager, typeof(CSharpFeaturesResources)); + new LocalizableResourceString(nameof(CSharpAnalyzersResources.Use_implicit_type), CSharpAnalyzersResources.ResourceManager, typeof(CSharpAnalyzersResources)); private static readonly LocalizableString s_Message = - new LocalizableResourceString(nameof(CSharpFeaturesResources.use_var_instead_of_explicit_type), CSharpFeaturesResources.ResourceManager, typeof(CSharpFeaturesResources)); + new LocalizableResourceString(nameof(CSharpAnalyzersResources.use_var_instead_of_explicit_type), CSharpAnalyzersResources.ResourceManager, typeof(CSharpAnalyzersResources)); protected override CSharpTypeStyleHelper Helper => CSharpUseImplicitTypeHelper.Instance; diff --git a/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.cs.xlf b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.cs.xlf new file mode 100644 index 0000000000000..41e4343826eef --- /dev/null +++ b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.cs.xlf @@ -0,0 +1,47 @@ + + + + + + Convert switch statement to expression + Convert switch statement to expression + + + + Make readonly fields writable + Make readonly fields writable + {Locked="readonly"} "readonly" is C# keyword and should not be localized. + + + Use explicit type + Use explicit type + + + + Use explicit type instead of 'var' + Use explicit type instead of 'var' + + + + Use implicit type + Use implicit type + + + + Use 'switch' expression + Use 'switch' expression + + + + Using directive is unnecessary. + Using directive is unnecessary. + + + + use 'var' instead of explicit type + use 'var' instead of explicit type + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.de.xlf b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.de.xlf new file mode 100644 index 0000000000000..1fa732976bc70 --- /dev/null +++ b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.de.xlf @@ -0,0 +1,47 @@ + + + + + + Convert switch statement to expression + Convert switch statement to expression + + + + Make readonly fields writable + Make readonly fields writable + {Locked="readonly"} "readonly" is C# keyword and should not be localized. + + + Use explicit type + Use explicit type + + + + Use explicit type instead of 'var' + Use explicit type instead of 'var' + + + + Use implicit type + Use implicit type + + + + Use 'switch' expression + Use 'switch' expression + + + + Using directive is unnecessary. + Using directive is unnecessary. + + + + use 'var' instead of explicit type + use 'var' instead of explicit type + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.es.xlf b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.es.xlf new file mode 100644 index 0000000000000..e86b6fd743550 --- /dev/null +++ b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.es.xlf @@ -0,0 +1,47 @@ + + + + + + Convert switch statement to expression + Convert switch statement to expression + + + + Make readonly fields writable + Make readonly fields writable + {Locked="readonly"} "readonly" is C# keyword and should not be localized. + + + Use explicit type + Use explicit type + + + + Use explicit type instead of 'var' + Use explicit type instead of 'var' + + + + Use implicit type + Use implicit type + + + + Use 'switch' expression + Use 'switch' expression + + + + Using directive is unnecessary. + Using directive is unnecessary. + + + + use 'var' instead of explicit type + use 'var' instead of explicit type + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.fr.xlf b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.fr.xlf new file mode 100644 index 0000000000000..91e381942a969 --- /dev/null +++ b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.fr.xlf @@ -0,0 +1,47 @@ + + + + + + Convert switch statement to expression + Convert switch statement to expression + + + + Make readonly fields writable + Make readonly fields writable + {Locked="readonly"} "readonly" is C# keyword and should not be localized. + + + Use explicit type + Use explicit type + + + + Use explicit type instead of 'var' + Use explicit type instead of 'var' + + + + Use implicit type + Use implicit type + + + + Use 'switch' expression + Use 'switch' expression + + + + Using directive is unnecessary. + Using directive is unnecessary. + + + + use 'var' instead of explicit type + use 'var' instead of explicit type + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.it.xlf b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.it.xlf new file mode 100644 index 0000000000000..f8127025883aa --- /dev/null +++ b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.it.xlf @@ -0,0 +1,47 @@ + + + + + + Convert switch statement to expression + Convert switch statement to expression + + + + Make readonly fields writable + Make readonly fields writable + {Locked="readonly"} "readonly" is C# keyword and should not be localized. + + + Use explicit type + Use explicit type + + + + Use explicit type instead of 'var' + Use explicit type instead of 'var' + + + + Use implicit type + Use implicit type + + + + Use 'switch' expression + Use 'switch' expression + + + + Using directive is unnecessary. + Using directive is unnecessary. + + + + use 'var' instead of explicit type + use 'var' instead of explicit type + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.ja.xlf b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.ja.xlf new file mode 100644 index 0000000000000..493c9858e58ea --- /dev/null +++ b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.ja.xlf @@ -0,0 +1,47 @@ + + + + + + Convert switch statement to expression + Convert switch statement to expression + + + + Make readonly fields writable + Make readonly fields writable + {Locked="readonly"} "readonly" is C# keyword and should not be localized. + + + Use explicit type + Use explicit type + + + + Use explicit type instead of 'var' + Use explicit type instead of 'var' + + + + Use implicit type + Use implicit type + + + + Use 'switch' expression + Use 'switch' expression + + + + Using directive is unnecessary. + Using directive is unnecessary. + + + + use 'var' instead of explicit type + use 'var' instead of explicit type + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.ko.xlf b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.ko.xlf new file mode 100644 index 0000000000000..0670bd07fdf91 --- /dev/null +++ b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.ko.xlf @@ -0,0 +1,47 @@ + + + + + + Convert switch statement to expression + Convert switch statement to expression + + + + Make readonly fields writable + Make readonly fields writable + {Locked="readonly"} "readonly" is C# keyword and should not be localized. + + + Use explicit type + Use explicit type + + + + Use explicit type instead of 'var' + Use explicit type instead of 'var' + + + + Use implicit type + Use implicit type + + + + Use 'switch' expression + Use 'switch' expression + + + + Using directive is unnecessary. + Using directive is unnecessary. + + + + use 'var' instead of explicit type + use 'var' instead of explicit type + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.pl.xlf b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.pl.xlf new file mode 100644 index 0000000000000..313c3713ae648 --- /dev/null +++ b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.pl.xlf @@ -0,0 +1,47 @@ + + + + + + Convert switch statement to expression + Convert switch statement to expression + + + + Make readonly fields writable + Make readonly fields writable + {Locked="readonly"} "readonly" is C# keyword and should not be localized. + + + Use explicit type + Use explicit type + + + + Use explicit type instead of 'var' + Use explicit type instead of 'var' + + + + Use implicit type + Use implicit type + + + + Use 'switch' expression + Use 'switch' expression + + + + Using directive is unnecessary. + Using directive is unnecessary. + + + + use 'var' instead of explicit type + use 'var' instead of explicit type + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.pt-BR.xlf b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.pt-BR.xlf new file mode 100644 index 0000000000000..b60b78635247a --- /dev/null +++ b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.pt-BR.xlf @@ -0,0 +1,47 @@ + + + + + + Convert switch statement to expression + Convert switch statement to expression + + + + Make readonly fields writable + Make readonly fields writable + {Locked="readonly"} "readonly" is C# keyword and should not be localized. + + + Use explicit type + Use explicit type + + + + Use explicit type instead of 'var' + Use explicit type instead of 'var' + + + + Use implicit type + Use implicit type + + + + Use 'switch' expression + Use 'switch' expression + + + + Using directive is unnecessary. + Using directive is unnecessary. + + + + use 'var' instead of explicit type + use 'var' instead of explicit type + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.ru.xlf b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.ru.xlf new file mode 100644 index 0000000000000..51a6c4515b829 --- /dev/null +++ b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.ru.xlf @@ -0,0 +1,47 @@ + + + + + + Convert switch statement to expression + Convert switch statement to expression + + + + Make readonly fields writable + Make readonly fields writable + {Locked="readonly"} "readonly" is C# keyword and should not be localized. + + + Use explicit type + Use explicit type + + + + Use explicit type instead of 'var' + Use explicit type instead of 'var' + + + + Use implicit type + Use implicit type + + + + Use 'switch' expression + Use 'switch' expression + + + + Using directive is unnecessary. + Using directive is unnecessary. + + + + use 'var' instead of explicit type + use 'var' instead of explicit type + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.tr.xlf b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.tr.xlf new file mode 100644 index 0000000000000..ab24c1f9d8194 --- /dev/null +++ b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.tr.xlf @@ -0,0 +1,47 @@ + + + + + + Convert switch statement to expression + Convert switch statement to expression + + + + Make readonly fields writable + Make readonly fields writable + {Locked="readonly"} "readonly" is C# keyword and should not be localized. + + + Use explicit type + Use explicit type + + + + Use explicit type instead of 'var' + Use explicit type instead of 'var' + + + + Use implicit type + Use implicit type + + + + Use 'switch' expression + Use 'switch' expression + + + + Using directive is unnecessary. + Using directive is unnecessary. + + + + use 'var' instead of explicit type + use 'var' instead of explicit type + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.zh-Hans.xlf b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.zh-Hans.xlf new file mode 100644 index 0000000000000..a137e0031ea66 --- /dev/null +++ b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.zh-Hans.xlf @@ -0,0 +1,47 @@ + + + + + + Convert switch statement to expression + Convert switch statement to expression + + + + Make readonly fields writable + Make readonly fields writable + {Locked="readonly"} "readonly" is C# keyword and should not be localized. + + + Use explicit type + Use explicit type + + + + Use explicit type instead of 'var' + Use explicit type instead of 'var' + + + + Use implicit type + Use implicit type + + + + Use 'switch' expression + Use 'switch' expression + + + + Using directive is unnecessary. + Using directive is unnecessary. + + + + use 'var' instead of explicit type + use 'var' instead of explicit type + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.zh-Hant.xlf b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.zh-Hant.xlf new file mode 100644 index 0000000000000..528244822866b --- /dev/null +++ b/src/Analyzers/CSharp/Analyzers/xlf/CSharpAnalyzersResources.zh-Hant.xlf @@ -0,0 +1,47 @@ + + + + + + Convert switch statement to expression + Convert switch statement to expression + + + + Make readonly fields writable + Make readonly fields writable + {Locked="readonly"} "readonly" is C# keyword and should not be localized. + + + Use explicit type + Use explicit type + + + + Use explicit type instead of 'var' + Use explicit type instead of 'var' + + + + Use implicit type + Use implicit type + + + + Use 'switch' expression + Use 'switch' expression + + + + Using directive is unnecessary. + Using directive is unnecessary. + + + + use 'var' instead of explicit type + use 'var' instead of explicit type + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/CodeFixes/CSharpCodeFixes.projitems b/src/Analyzers/CSharp/CodeFixes/CSharpCodeFixes.projitems index 3a21b34bea507..426f864366797 100644 --- a/src/Analyzers/CSharp/CodeFixes/CSharpCodeFixes.projitems +++ b/src/Analyzers/CSharp/CodeFixes/CSharpCodeFixes.projitems @@ -8,4 +8,16 @@ Microsoft.CodeAnalysis.CSharp.CodeFixes + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/CodeFixes/CSharpCodeFixesResources.resx b/src/Analyzers/CSharp/CodeFixes/CSharpCodeFixesResources.resx new file mode 100644 index 0000000000000..0fa3bc0af6cdf --- /dev/null +++ b/src/Analyzers/CSharp/CodeFixes/CSharpCodeFixesResources.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Remove Unnecessary Usings + + \ No newline at end of file diff --git a/src/Features/CSharp/Portable/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs b/src/Analyzers/CSharp/CodeFixes/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs similarity index 100% rename from src/Features/CSharp/Portable/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs rename to src/Analyzers/CSharp/CodeFixes/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs diff --git a/src/Features/CSharp/Portable/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionCodeFixProvider.cs b/src/Analyzers/CSharp/CodeFixes/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionCodeFixProvider.cs similarity index 96% rename from src/Features/CSharp/Portable/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionCodeFixProvider.cs rename to src/Analyzers/CSharp/CodeFixes/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionCodeFixProvider.cs index 89109bac18706..ce99a31c5e424 100644 --- a/src/Features/CSharp/Portable/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionCodeFixProvider.cs +++ b/src/Analyzers/CSharp/CodeFixes/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionCodeFixProvider.cs @@ -94,10 +94,10 @@ protected override async Task FixAllAsync(Document document, ImmutableArray> createChangedDocument) - : base(CSharpFeaturesResources.Convert_switch_statement_to_expression, createChangedDocument) + : base(CSharpAnalyzersResources.Convert_switch_statement_to_expression, createChangedDocument) { } } diff --git a/src/Features/CSharp/Portable/MakeStructFieldsWritable/CSharpMakeStructFieldsWritableCodeFixProvider.cs b/src/Analyzers/CSharp/CodeFixes/MakeStructFieldsWritable/CSharpMakeStructFieldsWritableCodeFixProvider.cs similarity index 94% rename from src/Features/CSharp/Portable/MakeStructFieldsWritable/CSharpMakeStructFieldsWritableCodeFixProvider.cs rename to src/Analyzers/CSharp/CodeFixes/MakeStructFieldsWritable/CSharpMakeStructFieldsWritableCodeFixProvider.cs index ca5d6ead8a516..32e1d43f720b0 100644 --- a/src/Features/CSharp/Portable/MakeStructFieldsWritable/CSharpMakeStructFieldsWritableCodeFixProvider.cs +++ b/src/Analyzers/CSharp/CodeFixes/MakeStructFieldsWritable/CSharpMakeStructFieldsWritableCodeFixProvider.cs @@ -72,10 +72,10 @@ protected override Task FixAllAsync( return Task.CompletedTask; } - private class MyCodeAction : CodeAction.DocumentChangeAction + private class MyCodeAction : CustomCodeActions.DocumentChangeAction { public MyCodeAction(Func> createChangedDocument) - : base(FeaturesResources.Make_readonly_fields_writable, createChangedDocument) + : base(CSharpAnalyzersResources.Make_readonly_fields_writable, createChangedDocument) { } } diff --git a/src/Features/CSharp/Portable/RemoveUnnecessaryImports/CSharpRemoveUnnecessaryImportsCodeFixProvider.cs b/src/Analyzers/CSharp/CodeFixes/RemoveUnnecessaryImports/CSharpRemoveUnnecessaryImportsCodeFixProvider.cs similarity index 92% rename from src/Features/CSharp/Portable/RemoveUnnecessaryImports/CSharpRemoveUnnecessaryImportsCodeFixProvider.cs rename to src/Analyzers/CSharp/CodeFixes/RemoveUnnecessaryImports/CSharpRemoveUnnecessaryImportsCodeFixProvider.cs index 279270cdedacb..086959c98c7b5 100644 --- a/src/Features/CSharp/Portable/RemoveUnnecessaryImports/CSharpRemoveUnnecessaryImportsCodeFixProvider.cs +++ b/src/Analyzers/CSharp/CodeFixes/RemoveUnnecessaryImports/CSharpRemoveUnnecessaryImportsCodeFixProvider.cs @@ -18,6 +18,6 @@ public CSharpRemoveUnnecessaryImportsCodeFixProvider() } protected override string GetTitle() - => CSharpFeaturesResources.Remove_Unnecessary_Usings; + => CSharpCodeFixesResources.Remove_Unnecessary_Usings; } } diff --git a/src/Features/CSharp/Portable/RemoveUnusedMembers/CSharpRemoveUnusedMembersCodeFixProvider.cs b/src/Analyzers/CSharp/CodeFixes/RemoveUnusedMembers/CSharpRemoveUnusedMembersCodeFixProvider.cs similarity index 100% rename from src/Features/CSharp/Portable/RemoveUnusedMembers/CSharpRemoveUnusedMembersCodeFixProvider.cs rename to src/Analyzers/CSharp/CodeFixes/RemoveUnusedMembers/CSharpRemoveUnusedMembersCodeFixProvider.cs diff --git a/src/Features/CSharp/Portable/TypeStyle/UseExplicitTypeCodeFixProvider.cs b/src/Analyzers/CSharp/CodeFixes/UseImplicitOrExplicitType/UseExplicitTypeCodeFixProvider.cs similarity index 96% rename from src/Features/CSharp/Portable/TypeStyle/UseExplicitTypeCodeFixProvider.cs rename to src/Analyzers/CSharp/CodeFixes/UseImplicitOrExplicitType/UseExplicitTypeCodeFixProvider.cs index b9fc257d48219..de0bd69146452 100644 --- a/src/Features/CSharp/Portable/TypeStyle/UseExplicitTypeCodeFixProvider.cs +++ b/src/Analyzers/CSharp/CodeFixes/UseImplicitOrExplicitType/UseExplicitTypeCodeFixProvider.cs @@ -158,12 +158,12 @@ private static ExpressionSyntax GenerateTupleDeclaration(ITypeSymbol typeSymbol, .WithTrailingTrivia(parensDesignation.GetTrailingTrivia()); } - private class MyCodeAction : CodeAction.DocumentChangeAction + private class MyCodeAction : CustomCodeActions.DocumentChangeAction { public MyCodeAction(Func> createChangedDocument) - : base(CSharpFeaturesResources.Use_explicit_type_instead_of_var, + : base(CSharpAnalyzersResources.Use_explicit_type_instead_of_var, createChangedDocument, - CSharpFeaturesResources.Use_explicit_type_instead_of_var) + CSharpAnalyzersResources.Use_explicit_type_instead_of_var) { } } diff --git a/src/Features/CSharp/Portable/TypeStyle/UseImplicitTypeCodeFixProvider.cs b/src/Analyzers/CSharp/CodeFixes/UseImplicitOrExplicitType/UseImplicitTypeCodeFixProvider.cs similarity index 91% rename from src/Features/CSharp/Portable/TypeStyle/UseImplicitTypeCodeFixProvider.cs rename to src/Analyzers/CSharp/CodeFixes/UseImplicitOrExplicitType/UseImplicitTypeCodeFixProvider.cs index 8bb23b62b5567..68d0b39828e3d 100644 --- a/src/Features/CSharp/Portable/TypeStyle/UseImplicitTypeCodeFixProvider.cs +++ b/src/Analyzers/CSharp/CodeFixes/UseImplicitOrExplicitType/UseImplicitTypeCodeFixProvider.cs @@ -61,12 +61,12 @@ internal static void ReplaceTypeWithVar(SyntaxEditor editor, SyntaxNode node) editor.ReplaceNode(node, implicitType); } - private class MyCodeAction : CodeAction.DocumentChangeAction + private class MyCodeAction : CustomCodeActions.DocumentChangeAction { public MyCodeAction(Func> createChangedDocument) - : base(CSharpFeaturesResources.use_var_instead_of_explicit_type, + : base(CSharpAnalyzersResources.use_var_instead_of_explicit_type, createChangedDocument, - CSharpFeaturesResources.use_var_instead_of_explicit_type) + CSharpAnalyzersResources.use_var_instead_of_explicit_type) { } } diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.cs.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.cs.xlf new file mode 100644 index 0000000000000..83634e639a670 --- /dev/null +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.cs.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Usings + Remove Unnecessary Usings + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.de.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.de.xlf new file mode 100644 index 0000000000000..04a6b5b230d99 --- /dev/null +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.de.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Usings + Remove Unnecessary Usings + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.es.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.es.xlf new file mode 100644 index 0000000000000..a497d47ea7999 --- /dev/null +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.es.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Usings + Remove Unnecessary Usings + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.fr.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.fr.xlf new file mode 100644 index 0000000000000..e6ca85c182096 --- /dev/null +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.fr.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Usings + Remove Unnecessary Usings + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.it.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.it.xlf new file mode 100644 index 0000000000000..40223718d3388 --- /dev/null +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.it.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Usings + Remove Unnecessary Usings + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.ja.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.ja.xlf new file mode 100644 index 0000000000000..371fbaad95807 --- /dev/null +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.ja.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Usings + Remove Unnecessary Usings + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.ko.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.ko.xlf new file mode 100644 index 0000000000000..0e536c63f1947 --- /dev/null +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.ko.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Usings + Remove Unnecessary Usings + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.pl.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.pl.xlf new file mode 100644 index 0000000000000..bbc685aaae351 --- /dev/null +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.pl.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Usings + Remove Unnecessary Usings + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.pt-BR.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.pt-BR.xlf new file mode 100644 index 0000000000000..94d6b21e2a368 --- /dev/null +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.pt-BR.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Usings + Remove Unnecessary Usings + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.ru.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.ru.xlf new file mode 100644 index 0000000000000..0ca6a99e6fc4d --- /dev/null +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.ru.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Usings + Remove Unnecessary Usings + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.tr.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.tr.xlf new file mode 100644 index 0000000000000..86a6aa1579fe4 --- /dev/null +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.tr.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Usings + Remove Unnecessary Usings + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.zh-Hans.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.zh-Hans.xlf new file mode 100644 index 0000000000000..b412e0b764e21 --- /dev/null +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.zh-Hans.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Usings + Remove Unnecessary Usings + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.zh-Hant.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.zh-Hant.xlf new file mode 100644 index 0000000000000..91ebe54d92312 --- /dev/null +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.zh-Hant.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Usings + Remove Unnecessary Usings + + + + + \ No newline at end of file diff --git a/src/Analyzers/CSharp/Tests/CSharpAnalyzers.UnitTests.projitems b/src/Analyzers/CSharp/Tests/CSharpAnalyzers.UnitTests.projitems index fd6f6a1d6daff..fe7ed340241a6 100644 --- a/src/Analyzers/CSharp/Tests/CSharpAnalyzers.UnitTests.projitems +++ b/src/Analyzers/CSharp/Tests/CSharpAnalyzers.UnitTests.projitems @@ -8,4 +8,16 @@ Microsoft.CodeAnalysis.CSharp.Analyzers.UnitTests + + + + + + + + + + + + \ No newline at end of file diff --git a/src/EditorFeatures/CSharpTest/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionFixAllTests.cs b/src/Analyzers/CSharp/Tests/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionFixAllTests.cs similarity index 100% rename from src/EditorFeatures/CSharpTest/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionFixAllTests.cs rename to src/Analyzers/CSharp/Tests/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionFixAllTests.cs diff --git a/src/EditorFeatures/CSharpTest/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionTests.cs b/src/Analyzers/CSharp/Tests/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionTests.cs similarity index 99% rename from src/EditorFeatures/CSharpTest/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionTests.cs rename to src/Analyzers/CSharp/Tests/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionTests.cs index 3c4f7f6a796b0..df9ff295604cb 100644 --- a/src/EditorFeatures/CSharpTest/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionTests.cs +++ b/src/Analyzers/CSharp/Tests/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionTests.cs @@ -5,8 +5,6 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.CodeAnalysis.CodeFixes; -using Microsoft.CodeAnalysis.CodeStyle; -using Microsoft.CodeAnalysis.CSharp.CodeStyle; using Microsoft.CodeAnalysis.CSharp.ConvertSwitchStatementToExpression; using Microsoft.CodeAnalysis.CSharp.Test.Utilities; using Microsoft.CodeAnalysis.Diagnostics; @@ -15,6 +13,14 @@ using Roslyn.Test.Utilities; using Xunit; +#if CODE_STYLE +using Microsoft.CodeAnalysis.CSharp.Internal.CodeStyle; +using Microsoft.CodeAnalysis.Internal.Options; +#else +using Microsoft.CodeAnalysis.CodeStyle; +using Microsoft.CodeAnalysis.CSharp.CodeStyle; +#endif + namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.ConvertSwitchStatementToExpression { public partial class ConvertSwitchStatementToExpressionTests : AbstractCSharpDiagnosticProviderBasedUserDiagnosticTest diff --git a/src/EditorFeatures/CSharpTest/MakeStructFieldsWritable/MakeStructFieldsWritableTests.cs b/src/Analyzers/CSharp/Tests/MakeStructFieldsWritable/MakeStructFieldsWritableTests.cs similarity index 100% rename from src/EditorFeatures/CSharpTest/MakeStructFieldsWritable/MakeStructFieldsWritableTests.cs rename to src/Analyzers/CSharp/Tests/MakeStructFieldsWritable/MakeStructFieldsWritableTests.cs diff --git a/src/EditorFeatures/CSharpTest/RemoveUnnecessaryImports/RemoveUnnecessaryImportsTests.cs b/src/Analyzers/CSharp/Tests/RemoveUnnecessaryImports/RemoveUnnecessaryImportsTests.cs similarity index 100% rename from src/EditorFeatures/CSharpTest/RemoveUnnecessaryImports/RemoveUnnecessaryImportsTests.cs rename to src/Analyzers/CSharp/Tests/RemoveUnnecessaryImports/RemoveUnnecessaryImportsTests.cs diff --git a/src/EditorFeatures/CSharpTest/RemoveUnnecessaryImports/RemoveUnnecessaryImportsTests_FixAllTests.cs b/src/Analyzers/CSharp/Tests/RemoveUnnecessaryImports/RemoveUnnecessaryImportsTests_FixAllTests.cs similarity index 100% rename from src/EditorFeatures/CSharpTest/RemoveUnnecessaryImports/RemoveUnnecessaryImportsTests_FixAllTests.cs rename to src/Analyzers/CSharp/Tests/RemoveUnnecessaryImports/RemoveUnnecessaryImportsTests_FixAllTests.cs diff --git a/src/EditorFeatures/CSharpTest/RemoveUnusedMembers/RemoveUnusedMembersTests.cs b/src/Analyzers/CSharp/Tests/RemoveUnusedMembers/RemoveUnusedMembersTests.cs similarity index 99% rename from src/EditorFeatures/CSharpTest/RemoveUnusedMembers/RemoveUnusedMembersTests.cs rename to src/Analyzers/CSharp/Tests/RemoveUnusedMembers/RemoveUnusedMembersTests.cs index 20670aa4b59f9..02c38d24a9646 100644 --- a/src/EditorFeatures/CSharpTest/RemoveUnusedMembers/RemoveUnusedMembersTests.cs +++ b/src/Analyzers/CSharp/Tests/RemoveUnusedMembers/RemoveUnusedMembersTests.cs @@ -1096,7 +1096,7 @@ public void M() using var workspace = CreateWorkspaceFromOptions(source, testParameters); var diagnostics = await GetDiagnosticsAsync(workspace, testParameters).ConfigureAwait(false); diagnostics.Verify(Diagnostic("IDE0052", "P").WithLocation(3, 17)); - var expectedMessage = string.Format(FeaturesResources.Private_property_0_can_be_converted_to_a_method_as_its_get_accessor_is_never_invoked, "MyClass.P"); + var expectedMessage = string.Format(AnalyzersResources.Private_property_0_can_be_converted_to_a_method_as_its_get_accessor_is_never_invoked, "MyClass.P"); Assert.Equal(expectedMessage, diagnostics.Single().GetMessage()); } diff --git a/src/EditorFeatures/CSharpTest/Diagnostics/UseImplicitOrExplicitType/UseExplicitTypeTests.cs b/src/Analyzers/CSharp/Tests/UseImplicitOrExplicitType/UseExplicitTypeTests.cs similarity index 99% rename from src/EditorFeatures/CSharpTest/Diagnostics/UseImplicitOrExplicitType/UseExplicitTypeTests.cs rename to src/Analyzers/CSharp/Tests/UseImplicitOrExplicitType/UseExplicitTypeTests.cs index 46f57a2e0c96a..2a0d8fa07f40e 100644 --- a/src/EditorFeatures/CSharpTest/Diagnostics/UseImplicitOrExplicitType/UseExplicitTypeTests.cs +++ b/src/Analyzers/CSharp/Tests/UseImplicitOrExplicitType/UseExplicitTypeTests.cs @@ -5,16 +5,22 @@ using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.CodeAnalysis.CodeFixes; -using Microsoft.CodeAnalysis.CodeStyle; -using Microsoft.CodeAnalysis.CSharp.CodeStyle; using Microsoft.CodeAnalysis.CSharp.Diagnostics.TypeStyle; using Microsoft.CodeAnalysis.CSharp.TypeStyle; using Microsoft.CodeAnalysis.Diagnostics; -using Microsoft.CodeAnalysis.Options; using Microsoft.CodeAnalysis.Test.Utilities; using Roslyn.Test.Utilities; using Xunit; +#if CODE_STYLE +using Microsoft.CodeAnalysis.CSharp.Internal.CodeStyle; +using Microsoft.CodeAnalysis.Internal.Options; +#else +using Microsoft.CodeAnalysis.CodeStyle; +using Microsoft.CodeAnalysis.CSharp.CodeStyle; +using Microsoft.CodeAnalysis.Options; +#endif + namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.Diagnostics.UseExplicitType { public partial class UseExplicitTypeTests : AbstractCSharpDiagnosticProviderBasedUserDiagnosticTest @@ -470,6 +476,9 @@ void Method(Program? x) await TestInRegularAndScriptAsync(before, after, options: ExplicitTypeExceptWhereApparent()); } +#if !CODE_STYLE // Tests depending on product code which need new nullable APIs are disabled for Code Style layer + // https://github.com/dotnet/roslyn/issues/41462 tracks enabling these tests for Code Style layer + [WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsUseExplicitType)] [WorkItem(40477, "https://github.com/dotnet/roslyn/issues/40477")] public async Task NullableType() @@ -963,6 +972,7 @@ void Method(System.Collections.Generic.IEnumerable<(Program, Program)> x) await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); await TestInRegularAndScriptAsync(before, after, options: ExplicitTypeExceptWhereApparent()); } +#endif [WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsUseExplicitType)] [WorkItem(23907, "https://github.com/dotnet/roslyn/issues/23907")] diff --git a/src/EditorFeatures/CSharpTest/Diagnostics/UseImplicitOrExplicitType/UseExplicitTypeTests_FixAllTests.cs b/src/Analyzers/CSharp/Tests/UseImplicitOrExplicitType/UseExplicitTypeTests_FixAllTests.cs similarity index 99% rename from src/EditorFeatures/CSharpTest/Diagnostics/UseImplicitOrExplicitType/UseExplicitTypeTests_FixAllTests.cs rename to src/Analyzers/CSharp/Tests/UseImplicitOrExplicitType/UseExplicitTypeTests_FixAllTests.cs index cb99d76c85ac8..b2a1a8f6666ab 100644 --- a/src/EditorFeatures/CSharpTest/Diagnostics/UseImplicitOrExplicitType/UseExplicitTypeTests_FixAllTests.cs +++ b/src/Analyzers/CSharp/Tests/UseImplicitOrExplicitType/UseExplicitTypeTests_FixAllTests.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System.Threading.Tasks; -using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Test.Utilities; using Xunit; diff --git a/src/EditorFeatures/CSharpTest/Diagnostics/UseImplicitOrExplicitType/UseImplicitTypeTests.cs b/src/Analyzers/CSharp/Tests/UseImplicitOrExplicitType/UseImplicitTypeTests.cs similarity index 99% rename from src/EditorFeatures/CSharpTest/Diagnostics/UseImplicitOrExplicitType/UseImplicitTypeTests.cs rename to src/Analyzers/CSharp/Tests/UseImplicitOrExplicitType/UseImplicitTypeTests.cs index 1246727595952..c59efd6d94e35 100644 --- a/src/EditorFeatures/CSharpTest/Diagnostics/UseImplicitOrExplicitType/UseImplicitTypeTests.cs +++ b/src/Analyzers/CSharp/Tests/UseImplicitOrExplicitType/UseImplicitTypeTests.cs @@ -5,17 +5,23 @@ using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.CodeAnalysis.CodeFixes; -using Microsoft.CodeAnalysis.CodeStyle; using Microsoft.CodeAnalysis.CSharp; -using Microsoft.CodeAnalysis.CSharp.CodeStyle; using Microsoft.CodeAnalysis.CSharp.Diagnostics.TypeStyle; using Microsoft.CodeAnalysis.CSharp.TypeStyle; using Microsoft.CodeAnalysis.Diagnostics; -using Microsoft.CodeAnalysis.Options; using Microsoft.CodeAnalysis.Test.Utilities; using Roslyn.Test.Utilities; using Xunit; +#if CODE_STYLE +using Microsoft.CodeAnalysis.CSharp.Internal.CodeStyle; +using Microsoft.CodeAnalysis.Internal.Options; +#else +using Microsoft.CodeAnalysis.CodeStyle; +using Microsoft.CodeAnalysis.CSharp.CodeStyle; +using Microsoft.CodeAnalysis.Options; +#endif + namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.Diagnostics.UseImplicitType { public partial class UseImplicitTypeTests : AbstractCSharpDiagnosticProviderBasedUserDiagnosticTest diff --git a/src/EditorFeatures/CSharpTest/Diagnostics/UseImplicitOrExplicitType/UseImplicitTypeTests_FixAllTests.cs b/src/Analyzers/CSharp/Tests/UseImplicitOrExplicitType/UseImplicitTypeTests_FixAllTests.cs similarity index 100% rename from src/EditorFeatures/CSharpTest/Diagnostics/UseImplicitOrExplicitType/UseImplicitTypeTests_FixAllTests.cs rename to src/Analyzers/CSharp/Tests/UseImplicitOrExplicitType/UseImplicitTypeTests_FixAllTests.cs diff --git a/src/Features/Core/Portable/CodeStyle/AbstractBuiltInCodeStyleDiagnosticAnalyzer.cs b/src/Analyzers/Core/Analyzers/AbstractBuiltInCodeStyleDiagnosticAnalyzer.cs similarity index 98% rename from src/Features/Core/Portable/CodeStyle/AbstractBuiltInCodeStyleDiagnosticAnalyzer.cs rename to src/Analyzers/Core/Analyzers/AbstractBuiltInCodeStyleDiagnosticAnalyzer.cs index 467e3ada0737b..bb4303e7ed823 100644 --- a/src/Features/Core/Portable/CodeStyle/AbstractBuiltInCodeStyleDiagnosticAnalyzer.cs +++ b/src/Analyzers/Core/Analyzers/AbstractBuiltInCodeStyleDiagnosticAnalyzer.cs @@ -6,10 +6,16 @@ using System.Diagnostics; using System.Linq; using Microsoft.CodeAnalysis.Diagnostics; -using Microsoft.CodeAnalysis.Options; namespace Microsoft.CodeAnalysis.CodeStyle { +#if CODE_STYLE + using OptionSet = AnalyzerConfigOptions; + using Microsoft.CodeAnalysis.Internal.Options; +#else + using Microsoft.CodeAnalysis.Options; +#endif + internal abstract class AbstractBuiltInCodeStyleDiagnosticAnalyzer : AbstractCodeStyleDiagnosticAnalyzer, IBuiltInAnalyzer { /// diff --git a/src/Features/Core/Portable/CodeQuality/AbstractCodeQualityDiagnosticAnalyzer.cs b/src/Analyzers/Core/Analyzers/AbstractCodeQualityDiagnosticAnalyzer.cs similarity index 80% rename from src/Features/Core/Portable/CodeQuality/AbstractCodeQualityDiagnosticAnalyzer.cs rename to src/Analyzers/Core/Analyzers/AbstractCodeQualityDiagnosticAnalyzer.cs index 45c9f3f4c8daf..3594b9219eef9 100644 --- a/src/Features/Core/Portable/CodeQuality/AbstractCodeQualityDiagnosticAnalyzer.cs +++ b/src/Analyzers/Core/Analyzers/AbstractCodeQualityDiagnosticAnalyzer.cs @@ -4,12 +4,25 @@ using System.Collections.Immutable; using Microsoft.CodeAnalysis.Diagnostics; -using Microsoft.CodeAnalysis.Options; namespace Microsoft.CodeAnalysis.CodeQuality { +#if CODE_STYLE + using OptionSet = AnalyzerConfigOptions; +#else + using OptionSet = Options.OptionSet; +#endif + + // Consider moving all the CodeQuality diagnostic analyzers into analyzer repo as CA rules. internal abstract class AbstractCodeQualityDiagnosticAnalyzer : DiagnosticAnalyzer, IBuiltInAnalyzer { + // Diagnostics in CodeStyle layer should be warnings by default. +#if CODE_STYLE + private const DiagnosticSeverity DefaultSeverity = DiagnosticSeverity.Warning; +#else + private const DiagnosticSeverity DefaultSeverity = DiagnosticSeverity.Info; +#endif + private readonly GeneratedCodeAnalysisFlags _generatedCodeAnalysisFlags; protected AbstractCodeQualityDiagnosticAnalyzer( @@ -49,7 +62,7 @@ protected static DiagnosticDescriptor CreateDescriptor( => new DiagnosticDescriptor( id, title, messageFormat, DiagnosticCategory.CodeQuality, - DiagnosticSeverity.Info, + DefaultSeverity, isEnabledByDefault, description, customTags: DiagnosticCustomTags.Create(isUnneccessary, isConfigurable, customTags)); diff --git a/src/CodeStyle/Core/Analyzers/AbstractCodeStyleDiagnosticAnalyzer.cs b/src/Analyzers/Core/Analyzers/AbstractCodeStyleDiagnosticAnalyzer.cs similarity index 93% rename from src/CodeStyle/Core/Analyzers/AbstractCodeStyleDiagnosticAnalyzer.cs rename to src/Analyzers/Core/Analyzers/AbstractCodeStyleDiagnosticAnalyzer.cs index 43d61fbbadbef..69f35b0f840a7 100644 --- a/src/CodeStyle/Core/Analyzers/AbstractCodeStyleDiagnosticAnalyzer.cs +++ b/src/Analyzers/Core/Analyzers/AbstractCodeStyleDiagnosticAnalyzer.cs @@ -9,6 +9,13 @@ namespace Microsoft.CodeAnalysis.CodeStyle { internal abstract class AbstractCodeStyleDiagnosticAnalyzer : DiagnosticAnalyzer { + // Diagnostics in CodeStyle layer should be warnings by default. +#if CODE_STYLE + private const DiagnosticSeverity DefaultSeverity = DiagnosticSeverity.Warning; +#else + private const DiagnosticSeverity DefaultSeverity = DiagnosticSeverity.Hidden; +#endif + protected readonly string DescriptorId; protected readonly DiagnosticDescriptor Descriptor; @@ -88,7 +95,7 @@ protected static DiagnosticDescriptor CreateDescriptorWithId( => new DiagnosticDescriptor( id, title, messageFormat, DiagnosticCategory.Style, - DiagnosticSeverity.Hidden, + !isUnneccessary ? DefaultSeverity : DiagnosticSeverity.Hidden, isEnabledByDefault: true, description: description, customTags: DiagnosticCustomTags.Create(isUnneccessary, isConfigurable, customTags)); diff --git a/src/Analyzers/Core/Analyzers/Analyzers.projitems b/src/Analyzers/Core/Analyzers/Analyzers.projitems index 835232f3a5a06..cdfe32e390e3d 100644 --- a/src/Analyzers/Core/Analyzers/Analyzers.projitems +++ b/src/Analyzers/Core/Analyzers/Analyzers.projitems @@ -8,4 +8,22 @@ Microsoft.CodeAnalysis.Analyzers + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/Analyzers/AnalyzersResources.resx b/src/Analyzers/Core/Analyzers/AnalyzersResources.resx new file mode 100644 index 0000000000000..006db427523aa --- /dev/null +++ b/src/Analyzers/Core/Analyzers/AnalyzersResources.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Private member '{0}' is unused. + + + Remove unused private members + + + Remove unread private members + + + Private member '{0}' can be removed as the value assigned to it is never read. + + + Private method '{0}' can be removed as it is never invoked. + + + Private property '{0}' can be converted to a method as its get accessor is never invoked. + + \ No newline at end of file diff --git a/src/Features/Core/Portable/Diagnostics/DiagnosticAnalyzerCategory.cs b/src/Analyzers/Core/Analyzers/DiagnosticAnalyzerCategory.cs similarity index 100% rename from src/Features/Core/Portable/Diagnostics/DiagnosticAnalyzerCategory.cs rename to src/Analyzers/Core/Analyzers/DiagnosticAnalyzerCategory.cs diff --git a/src/Features/Core/Portable/Diagnostics/DiagnosticCategory.cs b/src/Analyzers/Core/Analyzers/DiagnosticCategory.cs similarity index 100% rename from src/Features/Core/Portable/Diagnostics/DiagnosticCategory.cs rename to src/Analyzers/Core/Analyzers/DiagnosticCategory.cs diff --git a/src/Features/Core/Portable/Diagnostics/DiagnosticCustomTags.cs b/src/Analyzers/Core/Analyzers/DiagnosticCustomTags.cs similarity index 100% rename from src/Features/Core/Portable/Diagnostics/DiagnosticCustomTags.cs rename to src/Analyzers/Core/Analyzers/DiagnosticCustomTags.cs diff --git a/src/Features/Core/Portable/Shared/Utilities/DeserializationConstructorCheck.cs b/src/Analyzers/Core/Analyzers/Helpers/DeserializationConstructorCheck.cs similarity index 100% rename from src/Features/Core/Portable/Shared/Utilities/DeserializationConstructorCheck.cs rename to src/Analyzers/Core/Analyzers/Helpers/DeserializationConstructorCheck.cs diff --git a/src/Features/Core/Portable/Diagnostics/DiagnosticHelper.cs b/src/Analyzers/Core/Analyzers/Helpers/DiagnosticHelper.cs similarity index 98% rename from src/Features/Core/Portable/Diagnostics/DiagnosticHelper.cs rename to src/Analyzers/Core/Analyzers/Helpers/DiagnosticHelper.cs index 23047b9a9a867..0c9c410009b62 100644 --- a/src/Features/Core/Portable/Diagnostics/DiagnosticHelper.cs +++ b/src/Analyzers/Core/Analyzers/Helpers/DiagnosticHelper.cs @@ -10,7 +10,6 @@ using System.Runtime.Serialization.Json; using System.Text; using Microsoft.CodeAnalysis.PooledObjects; -using Microsoft.CodeAnalysis.RemoveUnnecessaryParentheses; using Roslyn.Utilities; namespace Microsoft.CodeAnalysis.Diagnostics @@ -74,7 +73,7 @@ public static Diagnostic Create( /// /// /// a map of location tag to index in additional locations. - /// for an example of usage. + /// see AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer for an example of usage. /// /// Arguments to the message of the diagnostic. /// The instance. diff --git a/src/Features/Core/Portable/Diagnostics/IBuiltInAnalyzer.cs b/src/Analyzers/Core/Analyzers/IBuiltInAnalyzer.cs similarity index 92% rename from src/Features/Core/Portable/Diagnostics/IBuiltInAnalyzer.cs rename to src/Analyzers/Core/Analyzers/IBuiltInAnalyzer.cs index 4113fdb398894..58b3342a2440d 100644 --- a/src/Features/Core/Portable/Diagnostics/IBuiltInAnalyzer.cs +++ b/src/Analyzers/Core/Analyzers/IBuiltInAnalyzer.cs @@ -2,10 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CodeAnalysis.Options; - namespace Microsoft.CodeAnalysis.Diagnostics { +#if CODE_STYLE + using OptionSet = AnalyzerConfigOptions; +#else + using OptionSet = Options.OptionSet; +#endif + /// /// This interface is a marker for all the analyzers that are built in. /// We will record non-fatal-watson if any analyzer with this interface throws an exception. diff --git a/src/Features/Core/Portable/Diagnostics/Analyzers/IDEDiagnosticIdToOptionMappingHelper.cs b/src/Analyzers/Core/Analyzers/IDEDiagnosticIdToOptionMappingHelper.cs similarity index 97% rename from src/Features/Core/Portable/Diagnostics/Analyzers/IDEDiagnosticIdToOptionMappingHelper.cs rename to src/Analyzers/Core/Analyzers/IDEDiagnosticIdToOptionMappingHelper.cs index 2f3e060422969..25683466748a9 100644 --- a/src/Features/Core/Portable/Diagnostics/Analyzers/IDEDiagnosticIdToOptionMappingHelper.cs +++ b/src/Analyzers/Core/Analyzers/IDEDiagnosticIdToOptionMappingHelper.cs @@ -7,7 +7,12 @@ using System.Collections.Immutable; using System.Diagnostics; using System.Linq; + +#if CODE_STYLE +using Microsoft.CodeAnalysis.Internal.Options; +#else using Microsoft.CodeAnalysis.Options; +#endif namespace Microsoft.CodeAnalysis.Diagnostics { diff --git a/src/Features/Core/Portable/Diagnostics/Analyzers/IDEDiagnosticIds.cs b/src/Analyzers/Core/Analyzers/IDEDiagnosticIds.cs similarity index 100% rename from src/Features/Core/Portable/Diagnostics/Analyzers/IDEDiagnosticIds.cs rename to src/Analyzers/Core/Analyzers/IDEDiagnosticIds.cs diff --git a/src/Features/Core/Portable/RemoveUnnecessaryImports/AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs b/src/Analyzers/Core/Analyzers/RemoveUnnecessaryImports/AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs similarity index 98% rename from src/Features/Core/Portable/RemoveUnnecessaryImports/AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs rename to src/Analyzers/Core/Analyzers/RemoveUnnecessaryImports/AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs index 22eb06d5bde29..c60632e9f9ebc 100644 --- a/src/Features/Core/Portable/RemoveUnnecessaryImports/AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs +++ b/src/Analyzers/Core/Analyzers/RemoveUnnecessaryImports/AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs @@ -8,13 +8,19 @@ using System.Linq; using System.Threading; using Microsoft.CodeAnalysis.Diagnostics; -using Microsoft.CodeAnalysis.Fading; using Microsoft.CodeAnalysis.LanguageServices; -using Microsoft.CodeAnalysis.Options; using Microsoft.CodeAnalysis.Shared.Extensions; using Microsoft.CodeAnalysis.Text; using Roslyn.Utilities; +#if CODE_STYLE +using Microsoft.CodeAnalysis.Internal.Fading; +using OptionSet = Microsoft.CodeAnalysis.Diagnostics.AnalyzerConfigOptions; +#else +using Microsoft.CodeAnalysis.Fading; +using Microsoft.CodeAnalysis.Options; +#endif + namespace Microsoft.CodeAnalysis.RemoveUnnecessaryImports { internal abstract class AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer diff --git a/src/Features/Core/Portable/RemoveUnusedMembers/AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs b/src/Analyzers/Core/Analyzers/RemoveUnusedMembers/AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs similarity index 97% rename from src/Features/Core/Portable/RemoveUnusedMembers/AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs rename to src/Analyzers/Core/Analyzers/RemoveUnusedMembers/AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs index e2d98ece72a82..86fbd5abddd0c 100644 --- a/src/Features/Core/Portable/RemoveUnusedMembers/AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs +++ b/src/Analyzers/Core/Analyzers/RemoveUnusedMembers/AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs @@ -25,15 +25,15 @@ internal abstract class AbstractRemoveUnusedMembersDiagnosticAnalyzer + + + + + Private member '{0}' can be removed as the value assigned to it is never read. + Private member '{0}' can be removed as the value assigned to it is never read. + + + + Private member '{0}' is unused. + Private member '{0}' is unused. + + + + Private method '{0}' can be removed as it is never invoked. + Private method '{0}' can be removed as it is never invoked. + + + + Private property '{0}' can be converted to a method as its get accessor is never invoked. + Private property '{0}' can be converted to a method as its get accessor is never invoked. + + + + Remove unread private members + Remove unread private members + + + + Remove unused private members + Remove unused private members + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.de.xlf b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.de.xlf new file mode 100644 index 0000000000000..498d962bf5a16 --- /dev/null +++ b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.de.xlf @@ -0,0 +1,37 @@ + + + + + + Private member '{0}' can be removed as the value assigned to it is never read. + Private member '{0}' can be removed as the value assigned to it is never read. + + + + Private member '{0}' is unused. + Private member '{0}' is unused. + + + + Private method '{0}' can be removed as it is never invoked. + Private method '{0}' can be removed as it is never invoked. + + + + Private property '{0}' can be converted to a method as its get accessor is never invoked. + Private property '{0}' can be converted to a method as its get accessor is never invoked. + + + + Remove unread private members + Remove unread private members + + + + Remove unused private members + Remove unused private members + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.es.xlf b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.es.xlf new file mode 100644 index 0000000000000..410d344c3fabc --- /dev/null +++ b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.es.xlf @@ -0,0 +1,37 @@ + + + + + + Private member '{0}' can be removed as the value assigned to it is never read. + Private member '{0}' can be removed as the value assigned to it is never read. + + + + Private member '{0}' is unused. + Private member '{0}' is unused. + + + + Private method '{0}' can be removed as it is never invoked. + Private method '{0}' can be removed as it is never invoked. + + + + Private property '{0}' can be converted to a method as its get accessor is never invoked. + Private property '{0}' can be converted to a method as its get accessor is never invoked. + + + + Remove unread private members + Remove unread private members + + + + Remove unused private members + Remove unused private members + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.fr.xlf b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.fr.xlf new file mode 100644 index 0000000000000..6e6ff02f36fc4 --- /dev/null +++ b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.fr.xlf @@ -0,0 +1,37 @@ + + + + + + Private member '{0}' can be removed as the value assigned to it is never read. + Private member '{0}' can be removed as the value assigned to it is never read. + + + + Private member '{0}' is unused. + Private member '{0}' is unused. + + + + Private method '{0}' can be removed as it is never invoked. + Private method '{0}' can be removed as it is never invoked. + + + + Private property '{0}' can be converted to a method as its get accessor is never invoked. + Private property '{0}' can be converted to a method as its get accessor is never invoked. + + + + Remove unread private members + Remove unread private members + + + + Remove unused private members + Remove unused private members + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.it.xlf b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.it.xlf new file mode 100644 index 0000000000000..7b63778518f78 --- /dev/null +++ b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.it.xlf @@ -0,0 +1,37 @@ + + + + + + Private member '{0}' can be removed as the value assigned to it is never read. + Private member '{0}' can be removed as the value assigned to it is never read. + + + + Private member '{0}' is unused. + Private member '{0}' is unused. + + + + Private method '{0}' can be removed as it is never invoked. + Private method '{0}' can be removed as it is never invoked. + + + + Private property '{0}' can be converted to a method as its get accessor is never invoked. + Private property '{0}' can be converted to a method as its get accessor is never invoked. + + + + Remove unread private members + Remove unread private members + + + + Remove unused private members + Remove unused private members + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.ja.xlf b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.ja.xlf new file mode 100644 index 0000000000000..a7372b064ff71 --- /dev/null +++ b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.ja.xlf @@ -0,0 +1,37 @@ + + + + + + Private member '{0}' can be removed as the value assigned to it is never read. + Private member '{0}' can be removed as the value assigned to it is never read. + + + + Private member '{0}' is unused. + Private member '{0}' is unused. + + + + Private method '{0}' can be removed as it is never invoked. + Private method '{0}' can be removed as it is never invoked. + + + + Private property '{0}' can be converted to a method as its get accessor is never invoked. + Private property '{0}' can be converted to a method as its get accessor is never invoked. + + + + Remove unread private members + Remove unread private members + + + + Remove unused private members + Remove unused private members + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.ko.xlf b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.ko.xlf new file mode 100644 index 0000000000000..1cd95ca2ad1f5 --- /dev/null +++ b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.ko.xlf @@ -0,0 +1,37 @@ + + + + + + Private member '{0}' can be removed as the value assigned to it is never read. + Private member '{0}' can be removed as the value assigned to it is never read. + + + + Private member '{0}' is unused. + Private member '{0}' is unused. + + + + Private method '{0}' can be removed as it is never invoked. + Private method '{0}' can be removed as it is never invoked. + + + + Private property '{0}' can be converted to a method as its get accessor is never invoked. + Private property '{0}' can be converted to a method as its get accessor is never invoked. + + + + Remove unread private members + Remove unread private members + + + + Remove unused private members + Remove unused private members + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.pl.xlf b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.pl.xlf new file mode 100644 index 0000000000000..3bcf3e59a4d1a --- /dev/null +++ b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.pl.xlf @@ -0,0 +1,37 @@ + + + + + + Private member '{0}' can be removed as the value assigned to it is never read. + Private member '{0}' can be removed as the value assigned to it is never read. + + + + Private member '{0}' is unused. + Private member '{0}' is unused. + + + + Private method '{0}' can be removed as it is never invoked. + Private method '{0}' can be removed as it is never invoked. + + + + Private property '{0}' can be converted to a method as its get accessor is never invoked. + Private property '{0}' can be converted to a method as its get accessor is never invoked. + + + + Remove unread private members + Remove unread private members + + + + Remove unused private members + Remove unused private members + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.pt-BR.xlf b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.pt-BR.xlf new file mode 100644 index 0000000000000..7a51052aedcf2 --- /dev/null +++ b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.pt-BR.xlf @@ -0,0 +1,37 @@ + + + + + + Private member '{0}' can be removed as the value assigned to it is never read. + Private member '{0}' can be removed as the value assigned to it is never read. + + + + Private member '{0}' is unused. + Private member '{0}' is unused. + + + + Private method '{0}' can be removed as it is never invoked. + Private method '{0}' can be removed as it is never invoked. + + + + Private property '{0}' can be converted to a method as its get accessor is never invoked. + Private property '{0}' can be converted to a method as its get accessor is never invoked. + + + + Remove unread private members + Remove unread private members + + + + Remove unused private members + Remove unused private members + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.ru.xlf b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.ru.xlf new file mode 100644 index 0000000000000..66c1ebc9c910b --- /dev/null +++ b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.ru.xlf @@ -0,0 +1,37 @@ + + + + + + Private member '{0}' can be removed as the value assigned to it is never read. + Private member '{0}' can be removed as the value assigned to it is never read. + + + + Private member '{0}' is unused. + Private member '{0}' is unused. + + + + Private method '{0}' can be removed as it is never invoked. + Private method '{0}' can be removed as it is never invoked. + + + + Private property '{0}' can be converted to a method as its get accessor is never invoked. + Private property '{0}' can be converted to a method as its get accessor is never invoked. + + + + Remove unread private members + Remove unread private members + + + + Remove unused private members + Remove unused private members + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.tr.xlf b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.tr.xlf new file mode 100644 index 0000000000000..f79dd2881321c --- /dev/null +++ b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.tr.xlf @@ -0,0 +1,37 @@ + + + + + + Private member '{0}' can be removed as the value assigned to it is never read. + Private member '{0}' can be removed as the value assigned to it is never read. + + + + Private member '{0}' is unused. + Private member '{0}' is unused. + + + + Private method '{0}' can be removed as it is never invoked. + Private method '{0}' can be removed as it is never invoked. + + + + Private property '{0}' can be converted to a method as its get accessor is never invoked. + Private property '{0}' can be converted to a method as its get accessor is never invoked. + + + + Remove unread private members + Remove unread private members + + + + Remove unused private members + Remove unused private members + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.zh-Hans.xlf b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.zh-Hans.xlf new file mode 100644 index 0000000000000..065c3fe73b297 --- /dev/null +++ b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.zh-Hans.xlf @@ -0,0 +1,37 @@ + + + + + + Private member '{0}' can be removed as the value assigned to it is never read. + Private member '{0}' can be removed as the value assigned to it is never read. + + + + Private member '{0}' is unused. + Private member '{0}' is unused. + + + + Private method '{0}' can be removed as it is never invoked. + Private method '{0}' can be removed as it is never invoked. + + + + Private property '{0}' can be converted to a method as its get accessor is never invoked. + Private property '{0}' can be converted to a method as its get accessor is never invoked. + + + + Remove unread private members + Remove unread private members + + + + Remove unused private members + Remove unused private members + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.zh-Hant.xlf b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.zh-Hant.xlf new file mode 100644 index 0000000000000..ffb2c56a92fa6 --- /dev/null +++ b/src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.zh-Hant.xlf @@ -0,0 +1,37 @@ + + + + + + Private member '{0}' can be removed as the value assigned to it is never read. + Private member '{0}' can be removed as the value assigned to it is never read. + + + + Private member '{0}' is unused. + Private member '{0}' is unused. + + + + Private method '{0}' can be removed as it is never invoked. + Private method '{0}' can be removed as it is never invoked. + + + + Private property '{0}' can be converted to a method as its get accessor is never invoked. + Private property '{0}' can be converted to a method as its get accessor is never invoked. + + + + Remove unread private members + Remove unread private members + + + + Remove unused private members + Remove unused private members + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/CodeFixes/CodeFixes.projitems b/src/Analyzers/Core/CodeFixes/CodeFixes.projitems index 1f4c475613ded..f35655448b391 100644 --- a/src/Analyzers/Core/CodeFixes/CodeFixes.projitems +++ b/src/Analyzers/Core/CodeFixes/CodeFixes.projitems @@ -8,4 +8,12 @@ Microsoft.CodeAnalysis.CodeFixes + + + + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/CodeFixes/CodeFixesResources.resx b/src/Analyzers/Core/CodeFixes/CodeFixesResources.resx new file mode 100644 index 0000000000000..6286bd89d8bda --- /dev/null +++ b/src/Analyzers/Core/CodeFixes/CodeFixesResources.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Remove unused member + + \ No newline at end of file diff --git a/src/Features/Core/Portable/CodeFixes/PredefinedCodeFixProviderNames.cs b/src/Analyzers/Core/CodeFixes/PredefinedCodeFixProviderNames.cs similarity index 100% rename from src/Features/Core/Portable/CodeFixes/PredefinedCodeFixProviderNames.cs rename to src/Analyzers/Core/CodeFixes/PredefinedCodeFixProviderNames.cs diff --git a/src/Features/Core/Portable/RemoveUnnecessaryImports/AbstractRemoveUnnecessaryImportsCodeFixProvider.cs b/src/Analyzers/Core/CodeFixes/RemoveUnnecessaryImports/AbstractRemoveUnnecessaryImportsCodeFixProvider.cs similarity index 100% rename from src/Features/Core/Portable/RemoveUnnecessaryImports/AbstractRemoveUnnecessaryImportsCodeFixProvider.cs rename to src/Analyzers/Core/CodeFixes/RemoveUnnecessaryImports/AbstractRemoveUnnecessaryImportsCodeFixProvider.cs diff --git a/src/Features/Core/Portable/RemoveUnusedMembers/AbstractRemoveUnusedMembersCodeFixProvider.cs b/src/Analyzers/Core/CodeFixes/RemoveUnusedMembers/AbstractRemoveUnusedMembersCodeFixProvider.cs similarity index 97% rename from src/Features/Core/Portable/RemoveUnusedMembers/AbstractRemoveUnusedMembersCodeFixProvider.cs rename to src/Analyzers/Core/CodeFixes/RemoveUnusedMembers/AbstractRemoveUnusedMembersCodeFixProvider.cs index 7efd256298e83..a89a61a4a4fb4 100644 --- a/src/Features/Core/Portable/RemoveUnusedMembers/AbstractRemoveUnusedMembersCodeFixProvider.cs +++ b/src/Analyzers/Core/CodeFixes/RemoveUnusedMembers/AbstractRemoveUnusedMembersCodeFixProvider.cs @@ -123,12 +123,13 @@ protected static void AdjustAndAddAppropriateDeclaratorsToRemove(SyntaxNode pare } } - private class MyCodeAction : CodeAction.DocumentChangeAction + private class MyCodeAction : CustomCodeActions.DocumentChangeAction { public MyCodeAction(Func> createChangedDocument) - : base(FeaturesResources.Remove_unused_member, createChangedDocument) + : base(CodeFixesResources.Remove_unused_member, createChangedDocument) { } } } } + diff --git a/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.cs.xlf b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.cs.xlf new file mode 100644 index 0000000000000..0aadbca67849d --- /dev/null +++ b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.cs.xlf @@ -0,0 +1,12 @@ + + + + + + Remove unused member + Remove unused member + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.de.xlf b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.de.xlf new file mode 100644 index 0000000000000..75df42ce49ffe --- /dev/null +++ b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.de.xlf @@ -0,0 +1,12 @@ + + + + + + Remove unused member + Remove unused member + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.es.xlf b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.es.xlf new file mode 100644 index 0000000000000..591606cd23a71 --- /dev/null +++ b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.es.xlf @@ -0,0 +1,12 @@ + + + + + + Remove unused member + Remove unused member + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.fr.xlf b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.fr.xlf new file mode 100644 index 0000000000000..1ad3e99f44ea2 --- /dev/null +++ b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.fr.xlf @@ -0,0 +1,12 @@ + + + + + + Remove unused member + Remove unused member + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.it.xlf b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.it.xlf new file mode 100644 index 0000000000000..c4dcd2abb708d --- /dev/null +++ b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.it.xlf @@ -0,0 +1,12 @@ + + + + + + Remove unused member + Remove unused member + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.ja.xlf b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.ja.xlf new file mode 100644 index 0000000000000..a0073c0953ab4 --- /dev/null +++ b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.ja.xlf @@ -0,0 +1,12 @@ + + + + + + Remove unused member + Remove unused member + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.ko.xlf b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.ko.xlf new file mode 100644 index 0000000000000..a5a7a4cda4a89 --- /dev/null +++ b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.ko.xlf @@ -0,0 +1,12 @@ + + + + + + Remove unused member + Remove unused member + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.pl.xlf b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.pl.xlf new file mode 100644 index 0000000000000..6fff60f559211 --- /dev/null +++ b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.pl.xlf @@ -0,0 +1,12 @@ + + + + + + Remove unused member + Remove unused member + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.pt-BR.xlf b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.pt-BR.xlf new file mode 100644 index 0000000000000..624207c5b5e5f --- /dev/null +++ b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.pt-BR.xlf @@ -0,0 +1,12 @@ + + + + + + Remove unused member + Remove unused member + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.ru.xlf b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.ru.xlf new file mode 100644 index 0000000000000..3422358616da9 --- /dev/null +++ b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.ru.xlf @@ -0,0 +1,12 @@ + + + + + + Remove unused member + Remove unused member + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.tr.xlf b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.tr.xlf new file mode 100644 index 0000000000000..e20e1000cd04a --- /dev/null +++ b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.tr.xlf @@ -0,0 +1,12 @@ + + + + + + Remove unused member + Remove unused member + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.zh-Hans.xlf b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.zh-Hans.xlf new file mode 100644 index 0000000000000..a10943cbb611f --- /dev/null +++ b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.zh-Hans.xlf @@ -0,0 +1,12 @@ + + + + + + Remove unused member + Remove unused member + + + + + \ No newline at end of file diff --git a/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.zh-Hant.xlf b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.zh-Hant.xlf new file mode 100644 index 0000000000000..147cd90852095 --- /dev/null +++ b/src/Analyzers/Core/CodeFixes/xlf/CodeFixesResources.zh-Hant.xlf @@ -0,0 +1,12 @@ + + + + + + Remove unused member + Remove unused member + + + + + \ No newline at end of file diff --git a/src/Features/VisualBasic/Portable/RemoveUnnecessaryImports/VisualBasicRemoveUnnecessaryImportsDiagnosticAnalyzer.vb b/src/Analyzers/VisualBasic/Analyzers/RemoveUnnecessaryImports/VisualBasicRemoveUnnecessaryImportsDiagnosticAnalyzer.vb similarity index 94% rename from src/Features/VisualBasic/Portable/RemoveUnnecessaryImports/VisualBasicRemoveUnnecessaryImportsDiagnosticAnalyzer.vb rename to src/Analyzers/VisualBasic/Analyzers/RemoveUnnecessaryImports/VisualBasicRemoveUnnecessaryImportsDiagnosticAnalyzer.vb index 1b11c6b060a1a..b0cb99a0c513e 100644 --- a/src/Features/VisualBasic/Portable/RemoveUnnecessaryImports/VisualBasicRemoveUnnecessaryImportsDiagnosticAnalyzer.vb +++ b/src/Analyzers/VisualBasic/Analyzers/RemoveUnnecessaryImports/VisualBasicRemoveUnnecessaryImportsDiagnosticAnalyzer.vb @@ -17,7 +17,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.RemoveUnnecessaryImports Inherits AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer Private Shared ReadOnly s_TitleAndMessageFormat As LocalizableString = - New LocalizableResourceString(NameOf(VBFeaturesResources.Imports_statement_is_unnecessary), VBFeaturesResources.ResourceManager, GetType(VBFeaturesResources.VBFeaturesResources)) + New LocalizableResourceString(NameOf(VisualBasicAnalyzersResources.Imports_statement_is_unnecessary), VisualBasicAnalyzersResources.ResourceManager, GetType(VisualBasicAnalyzersResources)) Protected Overrides Function GetTitleAndMessageFormatForClassificationIdDescriptor() As LocalizableString Return s_TitleAndMessageFormat diff --git a/src/Features/VisualBasic/Portable/RemoveUnusedMembers/VisualBasicRemoveUnusedMembersDiagnosticAnalyzer.vb b/src/Analyzers/VisualBasic/Analyzers/RemoveUnusedMembers/VisualBasicRemoveUnusedMembersDiagnosticAnalyzer.vb similarity index 100% rename from src/Features/VisualBasic/Portable/RemoveUnusedMembers/VisualBasicRemoveUnusedMembersDiagnosticAnalyzer.vb rename to src/Analyzers/VisualBasic/Analyzers/RemoveUnusedMembers/VisualBasicRemoveUnusedMembersDiagnosticAnalyzer.vb diff --git a/src/Analyzers/VisualBasic/Analyzers/VisualBasicAnalyzers.projitems b/src/Analyzers/VisualBasic/Analyzers/VisualBasicAnalyzers.projitems index f3339d0e8322b..79bdb1bfc56f9 100644 --- a/src/Analyzers/VisualBasic/Analyzers/VisualBasicAnalyzers.projitems +++ b/src/Analyzers/VisualBasic/Analyzers/VisualBasicAnalyzers.projitems @@ -8,4 +8,11 @@ Microsoft.CodeAnalysis.VisualBasic.Analyzers + + + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/Analyzers/VisualBasicAnalyzersResources.resx b/src/Analyzers/VisualBasic/Analyzers/VisualBasicAnalyzersResources.resx new file mode 100644 index 0000000000000..6cf27cf64b08e --- /dev/null +++ b/src/Analyzers/VisualBasic/Analyzers/VisualBasicAnalyzersResources.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Imports statement is unnecessary. + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.cs.xlf b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.cs.xlf new file mode 100644 index 0000000000000..579abb858302d --- /dev/null +++ b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.cs.xlf @@ -0,0 +1,12 @@ + + + + + + Imports statement is unnecessary. + Imports statement is unnecessary. + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.de.xlf b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.de.xlf new file mode 100644 index 0000000000000..31120dfc6584d --- /dev/null +++ b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.de.xlf @@ -0,0 +1,12 @@ + + + + + + Imports statement is unnecessary. + Imports statement is unnecessary. + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.es.xlf b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.es.xlf new file mode 100644 index 0000000000000..a911d3a74b874 --- /dev/null +++ b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.es.xlf @@ -0,0 +1,12 @@ + + + + + + Imports statement is unnecessary. + Imports statement is unnecessary. + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.fr.xlf b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.fr.xlf new file mode 100644 index 0000000000000..f3658e0106798 --- /dev/null +++ b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.fr.xlf @@ -0,0 +1,12 @@ + + + + + + Imports statement is unnecessary. + Imports statement is unnecessary. + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.it.xlf b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.it.xlf new file mode 100644 index 0000000000000..bf12bd6fef681 --- /dev/null +++ b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.it.xlf @@ -0,0 +1,12 @@ + + + + + + Imports statement is unnecessary. + Imports statement is unnecessary. + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.ja.xlf b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.ja.xlf new file mode 100644 index 0000000000000..4b5f2770f970d --- /dev/null +++ b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.ja.xlf @@ -0,0 +1,12 @@ + + + + + + Imports statement is unnecessary. + Imports statement is unnecessary. + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.ko.xlf b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.ko.xlf new file mode 100644 index 0000000000000..bfe754350a3c2 --- /dev/null +++ b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.ko.xlf @@ -0,0 +1,12 @@ + + + + + + Imports statement is unnecessary. + Imports statement is unnecessary. + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.pl.xlf b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.pl.xlf new file mode 100644 index 0000000000000..9eee58372b626 --- /dev/null +++ b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.pl.xlf @@ -0,0 +1,12 @@ + + + + + + Imports statement is unnecessary. + Imports statement is unnecessary. + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.pt-BR.xlf b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.pt-BR.xlf new file mode 100644 index 0000000000000..1284298bed50b --- /dev/null +++ b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.pt-BR.xlf @@ -0,0 +1,12 @@ + + + + + + Imports statement is unnecessary. + Imports statement is unnecessary. + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.ru.xlf b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.ru.xlf new file mode 100644 index 0000000000000..74cabc8569602 --- /dev/null +++ b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.ru.xlf @@ -0,0 +1,12 @@ + + + + + + Imports statement is unnecessary. + Imports statement is unnecessary. + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.tr.xlf b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.tr.xlf new file mode 100644 index 0000000000000..5b1641f003ba4 --- /dev/null +++ b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.tr.xlf @@ -0,0 +1,12 @@ + + + + + + Imports statement is unnecessary. + Imports statement is unnecessary. + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.zh-Hans.xlf b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.zh-Hans.xlf new file mode 100644 index 0000000000000..5a4f2857e3eae --- /dev/null +++ b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.zh-Hans.xlf @@ -0,0 +1,12 @@ + + + + + + Imports statement is unnecessary. + Imports statement is unnecessary. + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.zh-Hant.xlf b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.zh-Hant.xlf new file mode 100644 index 0000000000000..595dcb9968dd7 --- /dev/null +++ b/src/Analyzers/VisualBasic/Analyzers/xlf/VisualBasicAnalyzersResources.zh-Hant.xlf @@ -0,0 +1,12 @@ + + + + + + Imports statement is unnecessary. + Imports statement is unnecessary. + + + + + \ No newline at end of file diff --git a/src/Features/VisualBasic/Portable/RemoveUnnecessaryImports/VisualBasicRemoveUnnecessaryImportsCodeFixProvider.vb b/src/Analyzers/VisualBasic/CodeFixes/RemoveUnnecessaryImports/VisualBasicRemoveUnnecessaryImportsCodeFixProvider.vb similarity index 92% rename from src/Features/VisualBasic/Portable/RemoveUnnecessaryImports/VisualBasicRemoveUnnecessaryImportsCodeFixProvider.vb rename to src/Analyzers/VisualBasic/CodeFixes/RemoveUnnecessaryImports/VisualBasicRemoveUnnecessaryImportsCodeFixProvider.vb index 7989daab5a04c..e5aa91550bc86 100644 --- a/src/Features/VisualBasic/Portable/RemoveUnnecessaryImports/VisualBasicRemoveUnnecessaryImportsCodeFixProvider.vb +++ b/src/Analyzers/VisualBasic/CodeFixes/RemoveUnnecessaryImports/VisualBasicRemoveUnnecessaryImportsCodeFixProvider.vb @@ -18,7 +18,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.RemoveUnnecessaryImports End Sub Protected Overrides Function GetTitle() As String - Return VBFeaturesResources.Remove_Unnecessary_Imports + Return VisualBasicCodeFixesResources.Remove_Unnecessary_Imports End Function End Class End Namespace diff --git a/src/Features/VisualBasic/Portable/RemoveUnusedMembers/VisualBasicRemoveUnusedMembersCodeFixProvider.vb b/src/Analyzers/VisualBasic/CodeFixes/RemoveUnusedMembers/VisualBasicRemoveUnusedMembersCodeFixProvider.vb similarity index 100% rename from src/Features/VisualBasic/Portable/RemoveUnusedMembers/VisualBasicRemoveUnusedMembersCodeFixProvider.vb rename to src/Analyzers/VisualBasic/CodeFixes/RemoveUnusedMembers/VisualBasicRemoveUnusedMembersCodeFixProvider.vb diff --git a/src/Analyzers/VisualBasic/CodeFixes/VisualBasicCodeFixes.projitems b/src/Analyzers/VisualBasic/CodeFixes/VisualBasicCodeFixes.projitems index eed7dac7f5d66..e700dab7a348d 100644 --- a/src/Analyzers/VisualBasic/CodeFixes/VisualBasicCodeFixes.projitems +++ b/src/Analyzers/VisualBasic/CodeFixes/VisualBasicCodeFixes.projitems @@ -8,4 +8,11 @@ Microsoft.CodeAnalysis.VisualBasic.CodeFixes + + + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/CodeFixes/VisualBasicCodeFixesResources.resx b/src/Analyzers/VisualBasic/CodeFixes/VisualBasicCodeFixesResources.resx new file mode 100644 index 0000000000000..09b97e6c440a9 --- /dev/null +++ b/src/Analyzers/VisualBasic/CodeFixes/VisualBasicCodeFixesResources.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Remove Unnecessary Imports + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.cs.xlf b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.cs.xlf new file mode 100644 index 0000000000000..555342ffe1150 --- /dev/null +++ b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.cs.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Imports + Remove Unnecessary Imports + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.de.xlf b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.de.xlf new file mode 100644 index 0000000000000..a9d89d9445ab5 --- /dev/null +++ b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.de.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Imports + Remove Unnecessary Imports + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.es.xlf b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.es.xlf new file mode 100644 index 0000000000000..dd2518cc469d9 --- /dev/null +++ b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.es.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Imports + Remove Unnecessary Imports + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.fr.xlf b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.fr.xlf new file mode 100644 index 0000000000000..dedadf4d1f2ee --- /dev/null +++ b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.fr.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Imports + Remove Unnecessary Imports + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.it.xlf b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.it.xlf new file mode 100644 index 0000000000000..e74df4226f7e4 --- /dev/null +++ b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.it.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Imports + Remove Unnecessary Imports + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.ja.xlf b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.ja.xlf new file mode 100644 index 0000000000000..35076ab1c8898 --- /dev/null +++ b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.ja.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Imports + Remove Unnecessary Imports + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.ko.xlf b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.ko.xlf new file mode 100644 index 0000000000000..e74347336c0bc --- /dev/null +++ b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.ko.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Imports + Remove Unnecessary Imports + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.pl.xlf b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.pl.xlf new file mode 100644 index 0000000000000..5e43bbedbe6c0 --- /dev/null +++ b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.pl.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Imports + Remove Unnecessary Imports + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.pt-BR.xlf b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.pt-BR.xlf new file mode 100644 index 0000000000000..2f1cd7930c0d0 --- /dev/null +++ b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.pt-BR.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Imports + Remove Unnecessary Imports + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.ru.xlf b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.ru.xlf new file mode 100644 index 0000000000000..bc92945efc796 --- /dev/null +++ b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.ru.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Imports + Remove Unnecessary Imports + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.tr.xlf b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.tr.xlf new file mode 100644 index 0000000000000..0333553460761 --- /dev/null +++ b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.tr.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Imports + Remove Unnecessary Imports + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.zh-Hans.xlf b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.zh-Hans.xlf new file mode 100644 index 0000000000000..b3d956ab71d5c --- /dev/null +++ b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.zh-Hans.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Imports + Remove Unnecessary Imports + + + + + \ No newline at end of file diff --git a/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.zh-Hant.xlf b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.zh-Hant.xlf new file mode 100644 index 0000000000000..ddacccfc2a1e6 --- /dev/null +++ b/src/Analyzers/VisualBasic/CodeFixes/xlf/VisualBasicCodeFixesResources.zh-Hant.xlf @@ -0,0 +1,12 @@ + + + + + + Remove Unnecessary Imports + Remove Unnecessary Imports + + + + + \ No newline at end of file diff --git a/src/EditorFeatures/VisualBasicTest/RemoveUnnecessaryImports/RemoveUnnecessaryImportsTests.vb b/src/Analyzers/VisualBasic/Tests/RemoveUnnecessaryImports/RemoveUnnecessaryImportsTests.vb similarity index 100% rename from src/EditorFeatures/VisualBasicTest/RemoveUnnecessaryImports/RemoveUnnecessaryImportsTests.vb rename to src/Analyzers/VisualBasic/Tests/RemoveUnnecessaryImports/RemoveUnnecessaryImportsTests.vb diff --git a/src/EditorFeatures/VisualBasicTest/RemoveUnnecessaryImports/RemoveUnnecessaryImportsTests_FixAllTests.vb b/src/Analyzers/VisualBasic/Tests/RemoveUnnecessaryImports/RemoveUnnecessaryImportsTests_FixAllTests.vb similarity index 100% rename from src/EditorFeatures/VisualBasicTest/RemoveUnnecessaryImports/RemoveUnnecessaryImportsTests_FixAllTests.vb rename to src/Analyzers/VisualBasic/Tests/RemoveUnnecessaryImports/RemoveUnnecessaryImportsTests_FixAllTests.vb diff --git a/src/EditorFeatures/VisualBasicTest/RemoveUnusedMembers/RemoveUnusedMembersTests.vb b/src/Analyzers/VisualBasic/Tests/RemoveUnusedMembers/RemoveUnusedMembersTests.vb similarity index 100% rename from src/EditorFeatures/VisualBasicTest/RemoveUnusedMembers/RemoveUnusedMembersTests.vb rename to src/Analyzers/VisualBasic/Tests/RemoveUnusedMembers/RemoveUnusedMembersTests.vb diff --git a/src/Analyzers/VisualBasic/Tests/VisualBasicAnalyzers.UnitTests.projitems b/src/Analyzers/VisualBasic/Tests/VisualBasicAnalyzers.UnitTests.projitems index 6c5681358ea13..f44dc5b8742ad 100644 --- a/src/Analyzers/VisualBasic/Tests/VisualBasicAnalyzers.UnitTests.projitems +++ b/src/Analyzers/VisualBasic/Tests/VisualBasicAnalyzers.UnitTests.projitems @@ -8,4 +8,9 @@ Microsoft.CodeAnalysis.VisualBasic.Analyzers.UnitTests + + + + + \ No newline at end of file diff --git a/src/CodeStyle/BannedSymbols.txt b/src/CodeStyle/BannedSymbols.txt new file mode 100644 index 0000000000000..c606990637777 --- /dev/null +++ b/src/CodeStyle/BannedSymbols.txt @@ -0,0 +1,8 @@ +P:Microsoft.CodeAnalysis.Project.LanguageServices; Use 'GetExtendedLanguageServices' instead in CodeStyle layer (preprocessor variable 'CODE_STYLE') +M:Microsoft.CodeAnalysis.Host.HostWorkspaceServices.GetLanguageServices(System.String); Use 'GetExtendedLanguageServices' or directly get the language service by invoking 'GetLanguageService' or 'GetRequiredLanguageService' in CodeStyle layer (preprocessor variable 'CODE_STYLE') +T:Microsoft.CodeAnalysis.Options.OptionSet; 'OptionSet' is not available in CodeStyle layer. Add a using/Imports statement defining 'OptionSet = Microsoft.CodeAnalysis.Diagnostics.AnalyzerConfigOptions' when preprocessor variable 'CODE_STYLE' is defined +T:Microsoft.CodeAnalysis.CodeStyle.CodeStyleOption`1; Use 'Microsoft.CodeAnalysis.Internal.Options.CodeStyleOption' instead in CodeStyle layer (preprocessor variable 'CODE_STYLE') +T:Microsoft.CodeAnalysis.CodeStyle.CodeStyleOptions; Use 'Microsoft.CodeAnalysis.Internal.Options.CodeStyleOptions' instead in CodeStyle layer (preprocessor variable 'CODE_STYLE') +T:Microsoft.CodeAnalysis.Options.IOption; Use 'Microsoft.CodeAnalysis.Internal.Options.IOption' instead in CodeStyle layer (preprocessor variable 'CODE_STYLE') +T:Microsoft.CodeAnalysis.Options.OptionKey; Use 'Microsoft.CodeAnalysis.Internal.Options.OptionKey' instead in CodeStyle layer (preprocessor variable 'CODE_STYLE') +T:Microsoft.CodeAnalysis.CodeStyle.NotificationOption; Use 'Microsoft.CodeAnalysis.Internal.Options.NotificationOption' instead in CodeStyle layer (preprocessor variable 'CODE_STYLE') \ No newline at end of file diff --git a/src/CodeStyle/CSharp/Analyzers/CSharpCodeStyleResources.Designer.cs b/src/CodeStyle/CSharp/Analyzers/CSharpCodeStyleResources.Designer.cs index 10a27950593c6..54afb1516779e 100644 --- a/src/CodeStyle/CSharp/Analyzers/CSharpCodeStyleResources.Designer.cs +++ b/src/CodeStyle/CSharp/Analyzers/CSharpCodeStyleResources.Designer.cs @@ -10,7 +10,6 @@ namespace Microsoft.CodeAnalysis.CSharp { using System; - using System.Reflection; /// @@ -20,7 +19,7 @@ namespace Microsoft.CodeAnalysis.CSharp { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class CSharpCodeStyleResources { @@ -40,7 +39,7 @@ internal CSharpCodeStyleResources() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.CodeAnalysis.CSharp.CSharpCodeStyleResources", typeof(CSharpCodeStyleResources).GetTypeInfo().Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.CodeAnalysis.CSharp.CSharpCodeStyleResources", typeof(CSharpCodeStyleResources).Assembly); resourceMan = temp; } return resourceMan; @@ -61,6 +60,33 @@ internal CSharpCodeStyleResources() { } } + /// + /// Looks up a localized string similar to Code-block preferences. + /// + internal static string Code_block_preferences { + get { + return ResourceManager.GetString("Code_block_preferences", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Convert switch statement to expression. + /// + internal static string Convert_switch_statement_to_expression { + get { + return ResourceManager.GetString("Convert_switch_statement_to_expression", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Expression-bodied members. + /// + internal static string Expression_bodied_members { + get { + return ResourceManager.GetString("Expression_bodied_members", resourceCulture); + } + } + /// /// Looks up a localized string similar to Indentation preferences. /// @@ -70,6 +96,33 @@ internal static string Indentation_preferences { } } + /// + /// Looks up a localized string similar to Make readonly fields writable. + /// + internal static string Make_readonly_fields_writable { + get { + return ResourceManager.GetString("Make_readonly_fields_writable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Null-checking preferences. + /// + internal static string Null_checking_preferences { + get { + return ResourceManager.GetString("Null_checking_preferences", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Pattern matching preferences. + /// + internal static string Pattern_matching_preferences { + get { + return ResourceManager.GetString("Pattern_matching_preferences", resourceCulture); + } + } + /// /// Looks up a localized string similar to Space preferences. /// @@ -79,6 +132,78 @@ internal static string Space_preferences { } } + /// + /// Looks up a localized string similar to Use explicit type. + /// + internal static string Use_explicit_type { + get { + return ResourceManager.GetString("Use_explicit_type", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use explicit type instead of 'var'. + /// + internal static string Use_explicit_type_instead_of_var { + get { + return ResourceManager.GetString("Use_explicit_type_instead_of_var", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use implicit type. + /// + internal static string Use_implicit_type { + get { + return ResourceManager.GetString("Use_implicit_type", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use 'switch' expression. + /// + internal static string Use_switch_expression { + get { + return ResourceManager.GetString("Use_switch_expression", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to use 'var' instead of explicit type. + /// + internal static string use_var_instead_of_explicit_type { + get { + return ResourceManager.GetString("use_var_instead_of_explicit_type", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Using directive is unnecessary.. + /// + internal static string Using_directive_is_unnecessary { + get { + return ResourceManager.GetString("Using_directive_is_unnecessary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 'using' directive preferences. + /// + internal static string using_directive_preferences { + get { + return ResourceManager.GetString("using_directive_preferences", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to var preferences. + /// + internal static string var_preferences { + get { + return ResourceManager.GetString("var_preferences", resourceCulture); + } + } + /// /// Looks up a localized string similar to Wrapping preferences. /// diff --git a/src/CodeStyle/CSharp/Analyzers/Microsoft.CodeAnalysis.CSharp.CodeStyle.csproj b/src/CodeStyle/CSharp/Analyzers/Microsoft.CodeAnalysis.CSharp.CodeStyle.csproj index 2789180c47c9b..e43000b2dd28a 100644 --- a/src/CodeStyle/CSharp/Analyzers/Microsoft.CodeAnalysis.CSharp.CodeStyle.csproj +++ b/src/CodeStyle/CSharp/Analyzers/Microsoft.CodeAnalysis.CSharp.CodeStyle.csproj @@ -19,11 +19,6 @@ - - - - - @@ -76,7 +71,6 @@ - - + \ No newline at end of file diff --git a/src/CodeStyle/CSharp/CodeFixes/CSharpCodeStyleFixesResources.Designer.cs b/src/CodeStyle/CSharp/CodeFixes/CSharpCodeStyleFixesResources.Designer.cs index 6326dd3c354e1..fd3bc473bb51d 100644 --- a/src/CodeStyle/CSharp/CodeFixes/CSharpCodeStyleFixesResources.Designer.cs +++ b/src/CodeStyle/CSharp/CodeFixes/CSharpCodeStyleFixesResources.Designer.cs @@ -10,7 +10,6 @@ namespace Microsoft.CodeAnalysis.CSharp { using System; - using System.Reflection; /// @@ -20,7 +19,7 @@ namespace Microsoft.CodeAnalysis.CSharp { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class CSharpCodeStyleFixesResources { @@ -40,7 +39,7 @@ internal CSharpCodeStyleFixesResources() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.CodeAnalysis.CSharp.CSharpCodeStyleFixesResources", typeof(CSharpCodeStyleFixesResources).GetTypeInfo().Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.CodeAnalysis.CSharp.CSharpCodeStyleFixesResources", typeof(CSharpCodeStyleFixesResources).Assembly); resourceMan = temp; } return resourceMan; @@ -62,11 +61,29 @@ internal CSharpCodeStyleFixesResources() { } /// - /// Looks up a localized string similar to Remove this value when another is added.. + /// Looks up a localized string similar to Convert switch statement to expression. /// - internal static string EmptyResource { + internal static string Convert_switch_statement_to_expression { get { - return ResourceManager.GetString("EmptyResource", resourceCulture); + return ResourceManager.GetString("Convert_switch_statement_to_expression", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Expected string or char literal. + /// + internal static string Expected_string_or_char_literal { + get { + return ResourceManager.GetString("Expected_string_or_char_literal", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove Unnecessary Usings. + /// + internal static string Remove_Unnecessary_Usings { + get { + return ResourceManager.GetString("Remove_Unnecessary_Usings", resourceCulture); } } } diff --git a/src/CodeStyle/CSharp/CodeFixes/Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes.csproj b/src/CodeStyle/CSharp/CodeFixes/Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes.csproj index d0715648d9ba9..eb028423c6224 100644 --- a/src/CodeStyle/CSharp/CodeFixes/Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes.csproj +++ b/src/CodeStyle/CSharp/CodeFixes/Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes.csproj @@ -22,14 +22,14 @@ - <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CSharp.CodeStyle\$(Configuration)\$(TargetFramework)\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll"/> - <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes\$(Configuration)\$(TargetFramework)\Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes.dll"/> - <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CodeStyle\$(Configuration)\$(TargetFramework)\Microsoft.CodeAnalysis.CodeStyle.dll"/> - <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CodeStyle.Fixes\$(Configuration)\$(TargetFramework)\Microsoft.CodeAnalysis.CodeStyle.Fixes.dll"/> - <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CSharp.CodeStyle\$(Configuration)\$(TargetFramework)\**\Microsoft.CodeAnalysis.CSharp.CodeStyle.resources.dll"/> - <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes\$(Configuration)\$(TargetFramework)\**\Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes.resources.dll"/> - <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CodeStyle\$(Configuration)\$(TargetFramework)\**\Microsoft.CodeAnalysis.CodeStyle.resources.dll"/> - <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CodeStyle.Fixes\$(Configuration)\$(TargetFramework)\**\Microsoft.CodeAnalysis.CodeStyle.Fixes.resources.dll"/> + <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CSharp.CodeStyle\$(Configuration)\$(TargetFramework)\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll" /> + <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes\$(Configuration)\$(TargetFramework)\Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes.dll" /> + <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CodeStyle\$(Configuration)\$(TargetFramework)\Microsoft.CodeAnalysis.CodeStyle.dll" /> + <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CodeStyle.Fixes\$(Configuration)\$(TargetFramework)\Microsoft.CodeAnalysis.CodeStyle.Fixes.dll" /> + <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CSharp.CodeStyle\$(Configuration)\$(TargetFramework)\**\Microsoft.CodeAnalysis.CSharp.CodeStyle.resources.dll" /> + <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes\$(Configuration)\$(TargetFramework)\**\Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes.resources.dll" /> + <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CodeStyle\$(Configuration)\$(TargetFramework)\**\Microsoft.CodeAnalysis.CodeStyle.resources.dll" /> + <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CodeStyle.Fixes\$(Configuration)\$(TargetFramework)\**\Microsoft.CodeAnalysis.CodeStyle.Fixes.resources.dll" /> @@ -38,7 +38,7 @@ - + @@ -63,7 +63,6 @@ - - + \ No newline at end of file diff --git a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.cs.xlf b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.cs.xlf index 6eef083c31512..09e16175e8135 100644 --- a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.cs.xlf +++ b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.cs.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Odebrat tuto hodnotu, když se přidá jiná + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.de.xlf b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.de.xlf index b119ad5a5e8c0..036233e7dfffe 100644 --- a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.de.xlf +++ b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.de.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Dieser Wert wird entfernt, wenn ein anderer hinzugefügt wird. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.es.xlf b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.es.xlf index 1b4fa23371d84..39997e977d2e9 100644 --- a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.es.xlf +++ b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.es.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Quite este valor cuando se agregue otro. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.fr.xlf b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.fr.xlf index 7e6ae49c0448c..d1d9ec1ca4fdc 100644 --- a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.fr.xlf +++ b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.fr.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Supprimer cette valeur quand une autre est ajoutée. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.it.xlf b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.it.xlf index 63c2bde38d7c9..0a605965058a1 100644 --- a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.it.xlf +++ b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.it.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Rimuovere questo valore quando ne viene aggiunto un altro. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.ja.xlf b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.ja.xlf index f4006c0f79c55..0f32c9e649e41 100644 --- a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.ja.xlf +++ b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.ja.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - 別の値が追加されたら、この値を削除します。 + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.ko.xlf b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.ko.xlf index 340f9c313b082..bf8710ae41ec4 100644 --- a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.ko.xlf +++ b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.ko.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - 다른 값을 추가할 때 이 값을 제거하세요. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.pl.xlf b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.pl.xlf index 8e6d438112ac1..00099a3217091 100644 --- a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.pl.xlf +++ b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.pl.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Usuń tę wartość, gdy dodawana jest kolejna. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.pt-BR.xlf b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.pt-BR.xlf index afcd0a6e16671..4749986bfc9c8 100644 --- a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.pt-BR.xlf +++ b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.pt-BR.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Remover este valor quando outro for adicionado. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.ru.xlf b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.ru.xlf index c048734bdb588..f11932234113a 100644 --- a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.ru.xlf +++ b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.ru.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Удалите это значение при добавлении другого значения. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.tr.xlf b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.tr.xlf index 294e6c4b454e9..0e444a4ea7587 100644 --- a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.tr.xlf +++ b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.tr.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Başka bir değer eklendiğinde bu değeri kaldırın. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.zh-Hans.xlf b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.zh-Hans.xlf index be6877b951bb0..dde51a473e211 100644 --- a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.zh-Hans.xlf +++ b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.zh-Hans.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - 在添加其他值时删除此值。 + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.zh-Hant.xlf b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.zh-Hant.xlf index 8daad74a19618..d80ad5734d427 100644 --- a/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.zh-Hant.xlf +++ b/src/CodeStyle/CSharp/CodeFixes/xlf/CSharpCodeStyleFixesResources.zh-Hant.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - 當新增另一個值時移除此值。 + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/CSharp/Tests/Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests.csproj b/src/CodeStyle/CSharp/Tests/Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests.csproj index aea9438b0fc68..1f69ee6cdb58a 100644 --- a/src/CodeStyle/CSharp/Tests/Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests.csproj +++ b/src/CodeStyle/CSharp/Tests/Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests.csproj @@ -4,13 +4,13 @@ Library Microsoft.CodeAnalysis.CSharp + $(DefineConstants),CODE_STYLE net472 true - @@ -18,6 +18,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/CodeStyle/Core/Analyzers/AnalyzerConfigOptions.cs b/src/CodeStyle/Core/Analyzers/CompilerAnalyzerConfigOptions.cs similarity index 100% rename from src/CodeStyle/Core/Analyzers/AnalyzerConfigOptions.cs rename to src/CodeStyle/Core/Analyzers/CompilerAnalyzerConfigOptions.cs diff --git a/src/CodeStyle/Core/Analyzers/DiagnosticCategory.cs b/src/CodeStyle/Core/Analyzers/DiagnosticCategory.cs deleted file mode 100644 index 056c7c6893115..0000000000000 --- a/src/CodeStyle/Core/Analyzers/DiagnosticCategory.cs +++ /dev/null @@ -1,11 +0,0 @@ -// 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. - -namespace Microsoft.CodeAnalysis.CodeStyle -{ - internal static class DiagnosticCategory - { - public const string Style = nameof(Style); - } -} diff --git a/src/CodeStyle/Core/Analyzers/Formatting/Formatter.cs b/src/CodeStyle/Core/Analyzers/Formatting/Formatter.cs index bc62a7993cda9..b47d2c4151bc2 100644 --- a/src/CodeStyle/Core/Analyzers/Formatting/Formatter.cs +++ b/src/CodeStyle/Core/Analyzers/Formatting/Formatter.cs @@ -6,16 +6,21 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; +using Microsoft.CodeAnalysis.Formatting; using Microsoft.CodeAnalysis.Formatting.Rules; using Microsoft.CodeAnalysis.Text; using Roslyn.Utilities; using OptionSet = Microsoft.CodeAnalysis.Diagnostics.AnalyzerConfigOptions; -namespace Microsoft.CodeAnalysis.Formatting +namespace Microsoft.CodeAnalysis.Internal.Formatting { /// /// Formats whitespace in documents or syntax trees. /// + /// + /// This utility class is only to be used by the formatting analyzer and formatting code fixer in Code Style layer. + /// Other components should use the public "Formatter" type defined in "Microsoft.CodeAnalysis.Formatting" namespace. + /// internal static class Formatter { /// diff --git a/src/CodeStyle/Core/Analyzers/FormattingAnalyzerHelper.cs b/src/CodeStyle/Core/Analyzers/FormattingAnalyzerHelper.cs index f2623226cc4e1..5aba5abd6aa31 100644 --- a/src/CodeStyle/Core/Analyzers/FormattingAnalyzerHelper.cs +++ b/src/CodeStyle/Core/Analyzers/FormattingAnalyzerHelper.cs @@ -8,6 +8,7 @@ #if CODE_STYLE using FormatterState = Microsoft.CodeAnalysis.Formatting.ISyntaxFormattingService; +using Formatter = Microsoft.CodeAnalysis.Internal.Formatting.Formatter; using OptionSet = Microsoft.CodeAnalysis.Diagnostics.AnalyzerConfigOptions; #else using Microsoft.CodeAnalysis.Options; diff --git a/src/CodeStyle/Core/Analyzers/Microsoft.CodeAnalysis.CodeStyle.csproj b/src/CodeStyle/Core/Analyzers/Microsoft.CodeAnalysis.CodeStyle.csproj index 62152fbdd56f4..2fd17b15decbe 100644 --- a/src/CodeStyle/Core/Analyzers/Microsoft.CodeAnalysis.CodeStyle.csproj +++ b/src/CodeStyle/Core/Analyzers/Microsoft.CodeAnalysis.CodeStyle.csproj @@ -26,9 +26,8 @@ - - + diff --git a/src/CodeStyle/Core/Analyzers/Options/AnalyzerConfigOptionsExtensions.cs b/src/CodeStyle/Core/Analyzers/Options/AnalyzerConfigOptionsExtensions.cs index bff66da9b2c7b..8687a3dd5f07e 100644 --- a/src/CodeStyle/Core/Analyzers/Options/AnalyzerConfigOptionsExtensions.cs +++ b/src/CodeStyle/Core/Analyzers/Options/AnalyzerConfigOptionsExtensions.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CodeAnalysis.Options; +using Microsoft.CodeAnalysis.Internal.Options; using OptionSet = Microsoft.CodeAnalysis.Diagnostics.AnalyzerConfigOptions; namespace Microsoft.CodeAnalysis diff --git a/src/CodeStyle/Core/Analyzers/Options/AnalyzerOptionsExtensions.cs b/src/CodeStyle/Core/Analyzers/Options/AnalyzerOptionsExtensions.cs new file mode 100644 index 0000000000000..ba085918e9776 --- /dev/null +++ b/src/CodeStyle/Core/Analyzers/Options/AnalyzerOptionsExtensions.cs @@ -0,0 +1,14 @@ +// 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.Threading; + +namespace Microsoft.CodeAnalysis.Diagnostics +{ + internal static partial class AnalyzerOptionsExtensions + { + public static AnalyzerConfigOptions GetOptions(this AnalyzerOptions analyzerOptions, SyntaxTree syntaxTree, CancellationToken cancellationToken) + => analyzerOptions.AnalyzerConfigOptionsProvider.GetOptions(syntaxTree); + } +} diff --git a/src/CodeStyle/Core/CodeFixes/CodeStyleFixesResources.Designer.cs b/src/CodeStyle/Core/CodeFixes/CodeStyleFixesResources.Designer.cs index 5cbe2992fc17c..a179f6613491a 100644 --- a/src/CodeStyle/Core/CodeFixes/CodeStyleFixesResources.Designer.cs +++ b/src/CodeStyle/Core/CodeFixes/CodeStyleFixesResources.Designer.cs @@ -106,6 +106,15 @@ internal static string Project_of_ID_0_is_required_to_accomplish_the_task_but_is } } + /// + /// Looks up a localized string similar to Remove unused member. + /// + internal static string Remove_unused_member { + get { + return ResourceManager.GetString("Remove_unused_member", resourceCulture); + } + } + /// /// Looks up a localized string similar to Supplied diagnostic cannot be null.. /// diff --git a/src/CodeStyle/Core/CodeFixes/FormattingCodeFixHelper.cs b/src/CodeStyle/Core/CodeFixes/FormattingCodeFixHelper.cs index 428404b7fa002..55b2b1a9a7c1e 100644 --- a/src/CodeStyle/Core/CodeFixes/FormattingCodeFixHelper.cs +++ b/src/CodeStyle/Core/CodeFixes/FormattingCodeFixHelper.cs @@ -2,16 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if CODE_STYLE -extern alias CodeStyle; -#endif - using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis.Text; #if CODE_STYLE -using Formatter = CodeStyle::Microsoft.CodeAnalysis.Formatting.Formatter; +using Formatter = Microsoft.CodeAnalysis.Internal.Formatting.Formatter; using FormatterState = Microsoft.CodeAnalysis.Formatting.ISyntaxFormattingService; using OptionSet = Microsoft.CodeAnalysis.Diagnostics.AnalyzerConfigOptions; #else diff --git a/src/CodeStyle/Core/CodeFixes/FormattingCodeFixProvider.cs b/src/CodeStyle/Core/CodeFixes/FormattingCodeFixProvider.cs index 9e197ebe0da8b..e590dbdfffbb2 100644 --- a/src/CodeStyle/Core/CodeFixes/FormattingCodeFixProvider.cs +++ b/src/CodeStyle/Core/CodeFixes/FormattingCodeFixProvider.cs @@ -16,8 +16,7 @@ namespace Microsoft.CodeAnalysis.CodeStyle { - extern alias CodeStyle; - using Formatter = CodeStyle::Microsoft.CodeAnalysis.Formatting.Formatter; + using Formatter = Internal.Formatting.Formatter; using ISyntaxFormattingService = ISyntaxFormattingService; internal abstract class AbstractFormattingCodeFixProvider : CodeFixProvider diff --git a/src/CodeStyle/Core/CodeFixes/Host/Mef/CodeStyleHostLanguageServices.MefHostExportProvider.cs b/src/CodeStyle/Core/CodeFixes/Host/Mef/CodeStyleHostLanguageServices.MefHostExportProvider.cs new file mode 100644 index 0000000000000..d7c3af1bdd1b1 --- /dev/null +++ b/src/CodeStyle/Core/CodeFixes/Host/Mef/CodeStyleHostLanguageServices.MefHostExportProvider.cs @@ -0,0 +1,70 @@ +// 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.Collections.Generic; +using System.Collections.Immutable; +using System.Composition; +using System.Composition.Hosting; +using System.Linq; +using System.Reflection; +using Microsoft.CodeAnalysis.Host.Mef; +using Microsoft.CodeAnalysis.PooledObjects; + +namespace Microsoft.CodeAnalysis.Host +{ + internal sealed partial class CodeStyleHostLanguageServices : HostLanguageServices + { + private sealed class MefHostExportProvider : IMefHostExportProvider + { + private readonly CompositionHost _compositionContext; + + public MefHostExportProvider(string languageName) + { + var assemblies = CreateAssemblies(languageName); + var compositionConfiguration = new ContainerConfiguration().WithAssemblies(assemblies); + _compositionContext = compositionConfiguration.CreateContainer(); + } + + private static ImmutableArray CreateAssemblies(string languageName) + { + using var disposer = ArrayBuilder.GetInstance(out var assemblyNames); + + assemblyNames.Add("Microsoft.CodeAnalysis.CodeStyle.Fixes"); + switch (languageName) + { + case LanguageNames.CSharp: + assemblyNames.Add("Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes"); + break; + + case LanguageNames.VisualBasic: + assemblyNames.Add("Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes"); + break; + } + + return MefHostServices.DefaultAssemblies.Concat( + MefHostServicesHelpers.LoadNearbyAssemblies(assemblyNames)); + } + + + IEnumerable> IMefHostExportProvider.GetExports() + { + return _compositionContext.GetExports().Select(e => new Lazy(() => e)); + } + + IEnumerable> IMefHostExportProvider.GetExports() + { + var importer = new WithMetadataImporter(); + _compositionContext.SatisfyImports(importer); + return importer.Exports; + } + + private class WithMetadataImporter + { + [ImportMany] + public IEnumerable> Exports { get; set; } + } + } + } +} diff --git a/src/CodeStyle/Core/CodeFixes/Host/Mef/CodeStyleHostLanguageServices.cs b/src/CodeStyle/Core/CodeFixes/Host/Mef/CodeStyleHostLanguageServices.cs new file mode 100644 index 0000000000000..46f7f32f77eb2 --- /dev/null +++ b/src/CodeStyle/Core/CodeFixes/Host/Mef/CodeStyleHostLanguageServices.cs @@ -0,0 +1,46 @@ +// 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. + +#nullable enable + +using System.Collections.Concurrent; +using System.Diagnostics.CodeAnalysis; +using Microsoft.CodeAnalysis.Host.Mef; + +namespace Microsoft.CodeAnalysis.Host +{ + internal sealed partial class CodeStyleHostLanguageServices : HostLanguageServices + { + private static readonly ConcurrentDictionary s_mappedLanguageServices = + new ConcurrentDictionary(); + + private readonly HostLanguageServices _hostLanguageServices; + private readonly HostLanguageServices _codeStyleLanguageServices; + + private CodeStyleHostLanguageServices(HostLanguageServices hostLanguageServices) + { + _hostLanguageServices = hostLanguageServices; + + var exportProvider = new MefHostExportProvider(hostLanguageServices.Language); + _codeStyleLanguageServices = new MefWorkspaceServices(exportProvider, hostLanguageServices.WorkspaceServices.Workspace) + .GetLanguageServices(hostLanguageServices.Language); + } + + public static CodeStyleHostLanguageServices? GetMappedCodeStyleLanguageServices(HostLanguageServices? hostLanguageServices) + => hostLanguageServices != null ? s_mappedLanguageServices.GetOrAdd(hostLanguageServices, Create) : null; + public static CodeStyleHostLanguageServices GetRequiredMappedCodeStyleLanguageServices(HostLanguageServices hostLanguageServices) + => s_mappedLanguageServices.GetOrAdd(hostLanguageServices, Create); + private static CodeStyleHostLanguageServices Create(HostLanguageServices hostLanguageServices) + => new CodeStyleHostLanguageServices(hostLanguageServices); + + public override HostWorkspaceServices WorkspaceServices => _hostLanguageServices.WorkspaceServices; + public override string Language => _hostLanguageServices.Language; + + [return: MaybeNull] + public override TLanguageService GetService() + { + return _codeStyleLanguageServices.GetService() ?? _hostLanguageServices.GetService(); + } + } +} diff --git a/src/CodeStyle/Core/CodeFixes/Microsoft.CodeAnalysis.CodeStyle.Fixes.csproj b/src/CodeStyle/Core/CodeFixes/Microsoft.CodeAnalysis.CodeStyle.Fixes.csproj index a47f73ec25b44..77179947b294b 100644 --- a/src/CodeStyle/Core/CodeFixes/Microsoft.CodeAnalysis.CodeStyle.Fixes.csproj +++ b/src/CodeStyle/Core/CodeFixes/Microsoft.CodeAnalysis.CodeStyle.Fixes.csproj @@ -8,19 +8,17 @@ $(DefineConstants),CODE_STYLE - - + - diff --git a/src/CodeStyle/Core/Tests/Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities.csproj b/src/CodeStyle/Core/Tests/Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities.csproj new file mode 100644 index 0000000000000..c86d1148f5de4 --- /dev/null +++ b/src/CodeStyle/Core/Tests/Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities.csproj @@ -0,0 +1,31 @@ + + + + + Library + Microsoft.CodeAnalysis + $(DefineConstants),CODE_STYLE + net472 + false + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/CodeStyle/Core/Tests/Microsoft.CodeAnalysis.CodeStyle.UnitTests.csproj b/src/CodeStyle/Core/Tests/Microsoft.CodeAnalysis.CodeStyle.UnitTests.csproj deleted file mode 100644 index f3ad82b08a20d..0000000000000 --- a/src/CodeStyle/Core/Tests/Microsoft.CodeAnalysis.CodeStyle.UnitTests.csproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - - Library - Microsoft.CodeAnalysis - net472 - - - - - - - - - - \ No newline at end of file diff --git a/src/CodeStyle/Core/Tests/Properties/launchSettings.json b/src/CodeStyle/Core/Tests/Properties/launchSettings.json deleted file mode 100644 index 037383dc96d4f..0000000000000 --- a/src/CodeStyle/Core/Tests/Properties/launchSettings.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "profiles": { - "xUnit.net Console (32-bit)": { - "commandName": "Executable", - "executablePath": "$(NuGetPackageRoot)xunit.runner.console\\$(XUnitVersion)\\tools\\net452\\xunit.console.x86.exe", - "commandLineArgs": "$(TargetPath) -noshadow -verbose" - }, - "xUnit.net Console (64-bit)": { - "commandName": "Executable", - "executablePath": "$(NuGetPackageRoot)xunit.runner.console\\$(XUnitVersion)\\tools\\net452\\xunit.console.exe", - "commandLineArgs": "$(TargetPath) -noshadow -verbose" - } - } -} \ No newline at end of file diff --git a/src/CodeStyle/Directory.Build.targets b/src/CodeStyle/Directory.Build.targets index 42e78817dd243..ee638bd401f00 100644 --- a/src/CodeStyle/Directory.Build.targets +++ b/src/CodeStyle/Directory.Build.targets @@ -3,5 +3,9 @@ + + + + \ No newline at end of file diff --git a/src/CodeStyle/VisualBasic/Analyzers/Microsoft.CodeAnalysis.VisualBasic.CodeStyle.vbproj b/src/CodeStyle/VisualBasic/Analyzers/Microsoft.CodeAnalysis.VisualBasic.CodeStyle.vbproj index 3a31888bab0a3..81d6c219e26ab 100644 --- a/src/CodeStyle/VisualBasic/Analyzers/Microsoft.CodeAnalysis.VisualBasic.CodeStyle.vbproj +++ b/src/CodeStyle/VisualBasic/Analyzers/Microsoft.CodeAnalysis.VisualBasic.CodeStyle.vbproj @@ -9,9 +9,6 @@ Microsoft.CodeAnalysis.VisualBasic.CodeStyle.NewNameSinceWeReferenceTheAnalyzersAndNuGetCannotFigureItOut - - - @@ -71,7 +68,6 @@ - - + \ No newline at end of file diff --git a/src/CodeStyle/VisualBasic/Analyzers/VBCodeStyleResources.Designer.vb b/src/CodeStyle/VisualBasic/Analyzers/VBCodeStyleResources.Designer.vb index 324b9fb0458f3..e64f99491c812 100644 --- a/src/CodeStyle/VisualBasic/Analyzers/VBCodeStyleResources.Designer.vb +++ b/src/CodeStyle/VisualBasic/Analyzers/VBCodeStyleResources.Designer.vb @@ -12,7 +12,6 @@ Option Strict On Option Explicit On Imports System -Imports System.Reflection Namespace Microsoft.CodeAnalysis.VisualBasic.VBCodeStyleResources @@ -23,7 +22,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.VBCodeStyleResources ''' ''' A strongly-typed resource class, for looking up localized strings, etc. ''' - _ @@ -40,7 +39,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.VBCodeStyleResources Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then - Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("VBCodeStyleResources", GetType(VBCodeStyleResources).GetTypeInfo.Assembly) + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("VBCodeStyleResources", GetType(VBCodeStyleResources).Assembly) resourceMan = temp End If Return resourceMan @@ -62,11 +61,11 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.VBCodeStyleResources End Property ''' - ''' Looks up a localized string similar to Remove this value when another is added.. + ''' Looks up a localized string similar to Imports statement is unnecessary.. ''' - Friend ReadOnly Property EmptyResource() As String + Friend ReadOnly Property Imports_statement_is_unnecessary() As String Get - Return ResourceManager.GetString("EmptyResource", resourceCulture) + Return ResourceManager.GetString("Imports_statement_is_unnecessary", resourceCulture) End Get End Property End Module diff --git a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.cs.xlf b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.cs.xlf index 1ee0e68ad1a94..822ec68aebddb 100644 --- a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.cs.xlf +++ b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.cs.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Odebrat tuto hodnotu, když se přidá jiná + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.de.xlf b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.de.xlf index 99b3f10583c20..db97f6a1e53a3 100644 --- a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.de.xlf +++ b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.de.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Dieser Wert wird entfernt, wenn ein anderer hinzugefügt wird. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.es.xlf b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.es.xlf index 8aa42988759c7..64164183f7dfd 100644 --- a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.es.xlf +++ b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.es.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Quite este valor cuando se agregue otro. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.fr.xlf b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.fr.xlf index 4634371cdc62b..7234bc34e7d1d 100644 --- a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.fr.xlf +++ b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.fr.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Supprimer cette valeur quand une autre est ajoutée. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.it.xlf b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.it.xlf index d19ff3feee410..10516fc35a164 100644 --- a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.it.xlf +++ b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.it.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Rimuovere questo valore quando ne viene aggiunto un altro. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.ja.xlf b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.ja.xlf index c8af538b8bf9b..bdbe1fcc774ee 100644 --- a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.ja.xlf +++ b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.ja.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - 別の値が追加されたら、この値を削除します。 + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.ko.xlf b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.ko.xlf index b0790f0101343..bef266e0aa2ba 100644 --- a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.ko.xlf +++ b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.ko.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - 다른 값을 추가할 때 이 값을 제거하세요. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.pl.xlf b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.pl.xlf index c1bb87eab5e2b..5f0deec4c6512 100644 --- a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.pl.xlf +++ b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.pl.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Usuń tę wartość, gdy dodawana jest kolejna. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.pt-BR.xlf b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.pt-BR.xlf index 17951a56a9f7c..dac32ba01c3b6 100644 --- a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.pt-BR.xlf +++ b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.pt-BR.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Remover este valor quando outro for adicionado. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.ru.xlf b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.ru.xlf index ab8ee10782fc2..33ee0dc7f4bea 100644 --- a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.ru.xlf +++ b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.ru.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Удалите это значение при добавлении другого значения. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.tr.xlf b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.tr.xlf index d35891016275c..defa7d7f4eb4d 100644 --- a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.tr.xlf +++ b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.tr.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Başka bir değer eklendiğinde bu değeri kaldırın. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.zh-Hans.xlf b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.zh-Hans.xlf index 37d7c99d03180..4e8d2b4227b60 100644 --- a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.zh-Hans.xlf +++ b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.zh-Hans.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - 在添加其他值时删除此值。 + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.zh-Hant.xlf b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.zh-Hant.xlf index 2f99525762e7a..150e603a9666f 100644 --- a/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.zh-Hant.xlf +++ b/src/CodeStyle/VisualBasic/Analyzers/xlf/VBCodeStyleResources.zh-Hant.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - 當新增另一個值時移除此值。 + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/CodeFixes/Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes.vbproj b/src/CodeStyle/VisualBasic/CodeFixes/Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes.vbproj index 0202963b78320..c65493af391db 100644 --- a/src/CodeStyle/VisualBasic/CodeFixes/Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes.vbproj +++ b/src/CodeStyle/VisualBasic/CodeFixes/Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes.vbproj @@ -5,6 +5,7 @@ Library netstandard2.0 + $(DefineConstants),CODE_STYLE true @@ -21,14 +22,14 @@ - <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.VisualBasic.CodeStyle\$(Configuration)\$(TargetFramework)\Microsoft.CodeAnalysis.VisualBasic.CodeStyle.dll"/> - <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes\$(Configuration)\$(TargetFramework)\Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes.dll"/> - <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CodeStyle\$(Configuration)\$(TargetFramework)\Microsoft.CodeAnalysis.CodeStyle.dll"/> - <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CodeStyle.Fixes\$(Configuration)\$(TargetFramework)\Microsoft.CodeAnalysis.CodeStyle.Fixes.dll"/> - <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.VisualBasic.CodeStyle\$(Configuration)\$(TargetFramework)\**\Microsoft.CodeAnalysis.VisualBasic.CodeStyle.resources.dll"/> - <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes\$(Configuration)\$(TargetFramework)\**\Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes.resources.dll"/> - <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CodeStyle\$(Configuration)\$(TargetFramework)\**\Microsoft.CodeAnalysis.CodeStyle.resources.dll"/> - <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CodeStyle.Fixes\$(Configuration)\$(TargetFramework)\**\Microsoft.CodeAnalysis.CodeStyle.Fixes.resources.dll"/> + <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.VisualBasic.CodeStyle\$(Configuration)\$(TargetFramework)\Microsoft.CodeAnalysis.VisualBasic.CodeStyle.dll" /> + <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes\$(Configuration)\$(TargetFramework)\Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes.dll" /> + <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CodeStyle\$(Configuration)\$(TargetFramework)\Microsoft.CodeAnalysis.CodeStyle.dll" /> + <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CodeStyle.Fixes\$(Configuration)\$(TargetFramework)\Microsoft.CodeAnalysis.CodeStyle.Fixes.dll" /> + <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.VisualBasic.CodeStyle\$(Configuration)\$(TargetFramework)\**\Microsoft.CodeAnalysis.VisualBasic.CodeStyle.resources.dll" /> + <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes\$(Configuration)\$(TargetFramework)\**\Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes.resources.dll" /> + <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CodeStyle\$(Configuration)\$(TargetFramework)\**\Microsoft.CodeAnalysis.CodeStyle.resources.dll" /> + <_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CodeStyle.Fixes\$(Configuration)\$(TargetFramework)\**\Microsoft.CodeAnalysis.CodeStyle.Fixes.resources.dll" /> @@ -37,7 +38,7 @@ - + @@ -63,7 +64,6 @@ - - + \ No newline at end of file diff --git a/src/CodeStyle/VisualBasic/CodeFixes/VBCodeStyleFixesResources.Designer.vb b/src/CodeStyle/VisualBasic/CodeFixes/VBCodeStyleFixesResources.Designer.vb index 53db2ae4b35e0..3ab5a6b953824 100644 --- a/src/CodeStyle/VisualBasic/CodeFixes/VBCodeStyleFixesResources.Designer.vb +++ b/src/CodeStyle/VisualBasic/CodeFixes/VBCodeStyleFixesResources.Designer.vb @@ -12,7 +12,6 @@ Option Strict On Option Explicit On Imports System -Imports System.Reflection Namespace Microsoft.CodeAnalysis.VisualBasic.VBCodeStyleFixesResources @@ -23,7 +22,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.VBCodeStyleFixesResources ''' ''' A strongly-typed resource class, for looking up localized strings, etc. ''' - _ @@ -40,7 +39,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.VBCodeStyleFixesResources Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then - Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("VBCodeStyleFixesResources", GetType(VBCodeStyleFixesResources).GetTypeInfo.Assembly) + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("VBCodeStyleFixesResources", GetType(VBCodeStyleFixesResources).Assembly) resourceMan = temp End If Return resourceMan @@ -62,11 +61,11 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.VBCodeStyleFixesResources End Property ''' - ''' Looks up a localized string similar to Remove this value when another is added.. + ''' Looks up a localized string similar to Remove Unnecessary Imports. ''' - Friend ReadOnly Property EmptyResource() As String + Friend ReadOnly Property Remove_Unnecessary_Imports() As String Get - Return ResourceManager.GetString("EmptyResource", resourceCulture) + Return ResourceManager.GetString("Remove_Unnecessary_Imports", resourceCulture) End Get End Property End Module diff --git a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.cs.xlf b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.cs.xlf index bf069199a868a..5126048b1e908 100644 --- a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.cs.xlf +++ b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.cs.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Odebrat tuto hodnotu, když se přidá jiná + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.de.xlf b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.de.xlf index 4aaa654e93268..a5dd43d52897e 100644 --- a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.de.xlf +++ b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.de.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Dieser Wert wird entfernt, wenn ein anderer hinzugefügt wird. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.es.xlf b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.es.xlf index d348da1699902..0eb315ebc378d 100644 --- a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.es.xlf +++ b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.es.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Quite este valor cuando se agregue otro. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.fr.xlf b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.fr.xlf index 3f76a635c7886..0b2654babf4fa 100644 --- a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.fr.xlf +++ b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.fr.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Supprimer cette valeur quand une autre est ajoutée. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.it.xlf b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.it.xlf index 589952b571ce7..7d5951426a8ab 100644 --- a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.it.xlf +++ b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.it.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Rimuovere questo valore quando ne viene aggiunto un altro. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.ja.xlf b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.ja.xlf index 729c694202737..348b7b15e88a5 100644 --- a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.ja.xlf +++ b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.ja.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - 別の値が追加されたら、この値を削除します。 + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.ko.xlf b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.ko.xlf index 31d2d215a31d6..70e9c838cbe17 100644 --- a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.ko.xlf +++ b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.ko.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - 다른 값을 추가할 때 이 값을 제거하세요. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.pl.xlf b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.pl.xlf index 9b475a809c7df..0b400e8888ee3 100644 --- a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.pl.xlf +++ b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.pl.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Usuń tę wartość, gdy dodawana jest kolejna. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.pt-BR.xlf b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.pt-BR.xlf index 7999064a8defa..8affd0e0238d0 100644 --- a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.pt-BR.xlf +++ b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.pt-BR.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Remover este valor quando outro for adicionado. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.ru.xlf b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.ru.xlf index 826c7dc4343bc..aa098a45afb68 100644 --- a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.ru.xlf +++ b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.ru.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Удалите это значение при добавлении другого значения. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.tr.xlf b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.tr.xlf index cb54eb755ab7b..3185f715acba0 100644 --- a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.tr.xlf +++ b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.tr.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - Başka bir değer eklendiğinde bu değeri kaldırın. + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.zh-Hans.xlf b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.zh-Hans.xlf index 37da7ae8e7ea4..39b97d777e54c 100644 --- a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.zh-Hans.xlf +++ b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.zh-Hans.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - 在添加其他值时删除此值。 + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.zh-Hant.xlf b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.zh-Hant.xlf index ecb8712ecf42d..f23c770be485e 100644 --- a/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.zh-Hant.xlf +++ b/src/CodeStyle/VisualBasic/CodeFixes/xlf/VBCodeStyleFixesResources.zh-Hant.xlf @@ -4,7 +4,7 @@ Remove this value when another is added. - 當新增另一個值時移除此值。 + Remove this value when another is added. https://github.com/Microsoft/msbuild/issues/1661 diff --git a/src/CodeStyle/VisualBasic/Tests/Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests.vbproj b/src/CodeStyle/VisualBasic/Tests/Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests.vbproj index 40a63ccdf3a1f..1276ed38fb716 100644 --- a/src/CodeStyle/VisualBasic/Tests/Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests.vbproj +++ b/src/CodeStyle/VisualBasic/Tests/Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests.vbproj @@ -5,6 +5,7 @@ Library net472 + $(DefineConstants),CODE_STYLE true @@ -18,6 +19,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Compilers/Test/Utilities/CSharp/Microsoft.CodeAnalysis.CSharp.Test.Utilities.csproj b/src/Compilers/Test/Utilities/CSharp/Microsoft.CodeAnalysis.CSharp.Test.Utilities.csproj index a09ef090ff9a8..f58883ee0a429 100644 --- a/src/Compilers/Test/Utilities/CSharp/Microsoft.CodeAnalysis.CSharp.Test.Utilities.csproj +++ b/src/Compilers/Test/Utilities/CSharp/Microsoft.CodeAnalysis.CSharp.Test.Utilities.csproj @@ -31,6 +31,7 @@ + diff --git a/src/EditorFeatures/CSharpTest/AddUsing/AddUsingTests.cs b/src/EditorFeatures/CSharpTest/AddUsing/AddUsingTests.cs index 81e9d97a059f8..848b179c7ee60 100644 --- a/src/EditorFeatures/CSharpTest/AddUsing/AddUsingTests.cs +++ b/src/EditorFeatures/CSharpTest/AddUsing/AddUsingTests.cs @@ -59,8 +59,8 @@ internal async Task TestAsync( bool outOfProcess) { await TestInRegularAndScript1Async( - initialMarkup, expectedMarkup, index, priority, - parameters: new TestParameters(options: options, fixProviderData: outOfProcess)); + initialMarkup, expectedMarkup, index, + parameters: new TestParameters(options: options, fixProviderData: outOfProcess, priority: priority)); } } diff --git a/src/EditorFeatures/CSharpTest/Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests.csproj b/src/EditorFeatures/CSharpTest/Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests.csproj index ad56fce6215e9..5da1c530a64c0 100644 --- a/src/EditorFeatures/CSharpTest/Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests.csproj +++ b/src/EditorFeatures/CSharpTest/Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests.csproj @@ -38,6 +38,7 @@ + diff --git a/src/EditorFeatures/CSharpTest/PullMemberUp/CSharpPullMemberUpTests.cs b/src/EditorFeatures/CSharpTest/PullMemberUp/CSharpPullMemberUpTests.cs index 907d1beff88b5..875c75dd2e255 100644 --- a/src/EditorFeatures/CSharpTest/PullMemberUp/CSharpPullMemberUpTests.cs +++ b/src/EditorFeatures/CSharpTest/PullMemberUp/CSharpPullMemberUpTests.cs @@ -1433,14 +1433,13 @@ internal Task TestWithPullMemberDialogAsync( IEnumerable<(string name, bool makeAbstract)> selection = null, string destinationName = null, int index = 0, - CodeActionPriority? priority = null, TestParameters parameters = default) { var service = new TestPullMemberUpService(selection, destinationName); return TestInRegularAndScript1Async( initialMarkUp, expectedResult, - index, priority, + index, parameters.WithFixProviderData(service)); } diff --git a/src/EditorFeatures/CSharpTest/Squiggles/ErrorSquiggleProducerTests.cs b/src/EditorFeatures/CSharpTest/Squiggles/ErrorSquiggleProducerTests.cs index 17edddd17cb58..69c821beb3337 100644 --- a/src/EditorFeatures/CSharpTest/Squiggles/ErrorSquiggleProducerTests.cs +++ b/src/EditorFeatures/CSharpTest/Squiggles/ErrorSquiggleProducerTests.cs @@ -134,12 +134,12 @@ void Test() var third = spans[2]; Assert.Equal(PredefinedErrorTypeNames.Suggestion, first.Tag.ErrorType); - Assert.Equal(CSharpFeaturesResources.Using_directive_is_unnecessary, first.Tag.ToolTipContent); + Assert.Equal(CSharpAnalyzersResources.Using_directive_is_unnecessary, first.Tag.ToolTipContent); Assert.Equal(40, first.Span.Start); Assert.Equal(25, first.Span.Length); Assert.Equal(PredefinedErrorTypeNames.Suggestion, second.Tag.ErrorType); - Assert.Equal(CSharpFeaturesResources.Using_directive_is_unnecessary, second.Tag.ToolTipContent); + Assert.Equal(CSharpAnalyzersResources.Using_directive_is_unnecessary, second.Tag.ToolTipContent); Assert.Equal(82, second.Span.Start); Assert.Equal(60, second.Span.Length); diff --git a/src/EditorFeatures/CSharpTest2/Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests.csproj b/src/EditorFeatures/CSharpTest2/Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests.csproj index f415088dcefba..7247cdceb9219 100644 --- a/src/EditorFeatures/CSharpTest2/Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests.csproj +++ b/src/EditorFeatures/CSharpTest2/Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests.csproj @@ -24,6 +24,7 @@ + diff --git a/src/EditorFeatures/Core.Wpf/Microsoft.CodeAnalysis.EditorFeatures.Wpf.csproj b/src/EditorFeatures/Core.Wpf/Microsoft.CodeAnalysis.EditorFeatures.Wpf.csproj index 90b1acc4d3310..458f86012fcaf 100644 --- a/src/EditorFeatures/Core.Wpf/Microsoft.CodeAnalysis.EditorFeatures.Wpf.csproj +++ b/src/EditorFeatures/Core.Wpf/Microsoft.CodeAnalysis.EditorFeatures.Wpf.csproj @@ -51,6 +51,7 @@ + diff --git a/src/EditorFeatures/Core/Microsoft.CodeAnalysis.EditorFeatures.csproj b/src/EditorFeatures/Core/Microsoft.CodeAnalysis.EditorFeatures.csproj index dfeb35fcbe69e..8ad145b777450 100644 --- a/src/EditorFeatures/Core/Microsoft.CodeAnalysis.EditorFeatures.csproj +++ b/src/EditorFeatures/Core/Microsoft.CodeAnalysis.EditorFeatures.csproj @@ -79,6 +79,7 @@ + diff --git a/src/EditorFeatures/TestUtilities/ChangeSignature/AbstractChangeSignatureTests.cs b/src/EditorFeatures/DiagnosticsTestUtilities/ChangeSignature/AbstractChangeSignatureTests.cs similarity index 99% rename from src/EditorFeatures/TestUtilities/ChangeSignature/AbstractChangeSignatureTests.cs rename to src/EditorFeatures/DiagnosticsTestUtilities/ChangeSignature/AbstractChangeSignatureTests.cs index 66db009cf9612..c7c86ad58599c 100644 --- a/src/EditorFeatures/TestUtilities/ChangeSignature/AbstractChangeSignatureTests.cs +++ b/src/EditorFeatures/DiagnosticsTestUtilities/ChangeSignature/AbstractChangeSignatureTests.cs @@ -161,7 +161,7 @@ private string GetSignatureDescriptionString(int[] signature, int? totalParamete /// described above. public async Task TestAllSignatureChangesAsync(string languageName, string markup, int[] signaturePartCounts, ParseOptions parseOptions = null) { - Assert.Equal(signaturePartCounts.Length, 4); + Assert.Equal(4, signaturePartCounts.Length); Assert.True(signaturePartCounts[0] == 0 || signaturePartCounts[0] == 1); Assert.True(signaturePartCounts[3] == 0 || signaturePartCounts[3] == 1); diff --git a/src/EditorFeatures/TestUtilities/ChangeSignature/ChangeSignatureTestState.cs b/src/EditorFeatures/DiagnosticsTestUtilities/ChangeSignature/ChangeSignatureTestState.cs similarity index 100% rename from src/EditorFeatures/TestUtilities/ChangeSignature/ChangeSignatureTestState.cs rename to src/EditorFeatures/DiagnosticsTestUtilities/ChangeSignature/ChangeSignatureTestState.cs diff --git a/src/EditorFeatures/TestUtilities/CodeActions/AbstractCodeActionOrUserDiagnosticTest.cs b/src/EditorFeatures/DiagnosticsTestUtilities/CodeActions/AbstractCodeActionOrUserDiagnosticTest.cs similarity index 83% rename from src/EditorFeatures/TestUtilities/CodeActions/AbstractCodeActionOrUserDiagnosticTest.cs rename to src/EditorFeatures/DiagnosticsTestUtilities/CodeActions/AbstractCodeActionOrUserDiagnosticTest.cs index c6bc6a7f648aa..cace82f08e68d 100644 --- a/src/EditorFeatures/TestUtilities/CodeActions/AbstractCodeActionOrUserDiagnosticTest.cs +++ b/src/EditorFeatures/DiagnosticsTestUtilities/CodeActions/AbstractCodeActionOrUserDiagnosticTest.cs @@ -5,29 +5,35 @@ using System; using System.Collections.Generic; using System.Collections.Immutable; +using System.Diagnostics; +using System.IO; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CodeActions; -using Microsoft.CodeAnalysis.CodeStyle; -using Microsoft.CodeAnalysis.Editor.Implementation.Preview; using Microsoft.CodeAnalysis.Editor.UnitTests.Extensions; using Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces; -using Microsoft.CodeAnalysis.Options; using Microsoft.CodeAnalysis.Shared.Utilities; using Microsoft.CodeAnalysis.Test.Utilities; using Microsoft.CodeAnalysis.Text; using Microsoft.CodeAnalysis.UnitTests; -using Roslyn.Test.Utilities; using Roslyn.Utilities; +using Roslyn.Test.Utilities; using Xunit; +#if CODE_STYLE +using Microsoft.CodeAnalysis.Internal.Options; +#else +using Microsoft.CodeAnalysis.CodeStyle; +using Microsoft.CodeAnalysis.Options; +#endif + namespace Microsoft.CodeAnalysis.Editor.UnitTests.CodeActions { [UseExportProvider] - public abstract class AbstractCodeActionOrUserDiagnosticTest + public abstract partial class AbstractCodeActionOrUserDiagnosticTest { public struct TestParameters { @@ -82,6 +88,8 @@ public TestParameters WithIncludeDiagnosticsOutsideSelection(bool includeDiagnos => new TestParameters(parseOptions, compilationOptions, options, fixProviderData, index, priority, retainNonFixableDiagnostics, includeDiagnosticsOutsideSelection, title); } + private const string AutoGeneratedAnalyzerConfigHeader = @"# auto-generated .editorconfig for code style options"; + protected abstract string GetLanguage(); protected abstract ParseOptions GetScriptOptions(); @@ -92,11 +100,134 @@ protected TestWorkspace CreateWorkspaceFromOptions( ? TestWorkspace.Create(initialMarkup, openDocuments: false) : CreateWorkspaceFromFile(initialMarkup, parameters); + // For CodeStyle layer testing, we create an .editorconfig at project root + // to apply the options as workspace options are not available in CodeStyle layer. + // Otherwise, we apply the options directly to the workspace. + +#if CODE_STYLE + // We need to ensure that our projects/documents are rooted for + // execution from CodeStyle layer as we will be adding a rooted .editorconfig to each project + // to apply the options. + if (parameters.options != null) + { + MakeProjectsAndDocumentsRooted(workspace); + AddAnalyzerConfigDocumentWithOptions(workspace, parameters.options); + } +#else workspace.ApplyOptions(parameters.options); +#endif return workspace; } + private static void MakeProjectsAndDocumentsRooted(TestWorkspace workspace) + { + const string defaultRootFilePath = @"z:\"; + var newSolution = workspace.CurrentSolution; + foreach (var projectId in workspace.CurrentSolution.ProjectIds) + { + var project = newSolution.GetProject(projectId); + + string projectRootFilePath; + if (!PathUtilities.IsAbsolute(project.FilePath)) + { + projectRootFilePath = defaultRootFilePath; + newSolution = newSolution.WithProjectFilePath(projectId, Path.Combine(projectRootFilePath, project.FilePath)); + } + else + { + projectRootFilePath = PathUtilities.GetPathRoot(project.FilePath); + } + + foreach (var documentId in project.DocumentIds) + { + var document = newSolution.GetDocument(documentId); + if (!PathUtilities.IsAbsolute(document.FilePath)) + { + newSolution = newSolution.WithDocumentFilePath(documentId, Path.Combine(projectRootFilePath, document.FilePath)); + } + else + { + Assert.Equal(projectRootFilePath, PathUtilities.GetPathRoot(document.FilePath)); + } + } + } + + var applied = workspace.TryApplyChanges(newSolution); + Assert.True(applied); + return; + } + + private static void AddAnalyzerConfigDocumentWithOptions(TestWorkspace workspace, IDictionary options) + { + Debug.Assert(options != null); + var analyzerConfigText = GenerateAnalyzerConfigText(options); + + var newSolution = workspace.CurrentSolution; + foreach (var project in workspace.Projects) + { + Assert.True(PathUtilities.IsAbsolute(project.FilePath)); + var projectRootFilePath = PathUtilities.GetPathRoot(project.FilePath); + var documentId = DocumentId.CreateNewId(project.Id); + newSolution = newSolution.AddAnalyzerConfigDocument( + documentId, + ".editorconfig", + SourceText.From(analyzerConfigText), + filePath: Path.Combine(projectRootFilePath, ".editorconfig")); + } + + var applied = workspace.TryApplyChanges(newSolution); + Assert.True(applied); + return; + + static string GenerateAnalyzerConfigText(IDictionary options) + { + var textBuilder = new StringBuilder(); + + // Add an auto-generated header at the top so we can skip this file in expected baseline validation. + textBuilder.AppendLine(AutoGeneratedAnalyzerConfigHeader); + textBuilder.AppendLine(); + + foreach (var (optionKey, value) in options) + { + foreach (var location in optionKey.Option.StorageLocations) + { + if (location is IEditorConfigStorageLocation2 editorConfigStorageLocation) + { + var editorConfigString = editorConfigStorageLocation.GetEditorConfigString(value, default); + if (editorConfigString != null) + { + textBuilder.AppendLine(GetSectionHeader(optionKey)); + textBuilder.AppendLine(editorConfigString); + textBuilder.AppendLine(); + break; + } + + Assert.False(true, "Unexpected non-editorconfig option"); + } + } + } + + return textBuilder.ToString(); + + static string GetSectionHeader(OptionKey optionKey) + { + if (optionKey.Option.IsPerLanguage) + { + switch (optionKey.Language) + { + case LanguageNames.CSharp: + return "[*.cs]"; + case LanguageNames.VisualBasic: + return "[*.vb]"; + } + } + + return "[*]"; + } + } + } + protected abstract TestWorkspace CreateWorkspaceFromFile(string initialMarkup, TestParameters parameters); private TestParameters WithRegularOptions(TestParameters parameters) @@ -199,138 +330,6 @@ protected async Task TestActionCountAsync( } } - protected async Task TestAddDocumentInRegularAndScriptAsync( - string initialMarkup, string expectedMarkup, - ImmutableArray expectedContainers, - string expectedDocumentName, - TestParameters parameters = default) - { - await TestAddDocument( - initialMarkup, expectedMarkup, - expectedContainers, expectedDocumentName, - WithRegularOptions(parameters)); - await TestAddDocument( - initialMarkup, expectedMarkup, - expectedContainers, expectedDocumentName, - WithScriptOptions(parameters)); - } - - protected async Task> TestAddDocumentAsync( - TestParameters parameters, - TestWorkspace workspace, - string expectedMarkup, - string expectedDocumentName, - ImmutableArray expectedContainers) - { - var (_, action) = await GetCodeActionsAsync(workspace, parameters); - return await TestAddDocument( - workspace, expectedMarkup, expectedContainers, - expectedDocumentName, action); - } - - protected async Task TestAddDocument( - string initialMarkup, - string expectedMarkup, - ImmutableArray expectedContainers, - string expectedDocumentName, - TestParameters parameters = default) - { - using (var workspace = CreateWorkspaceFromOptions(initialMarkup, parameters)) - { - var (_, action) = await GetCodeActionsAsync(workspace, parameters); - await TestAddDocument( - workspace, expectedMarkup, expectedContainers, - expectedDocumentName, action); - } - } - - private async Task> TestAddDocument( - TestWorkspace workspace, - string expectedMarkup, - ImmutableArray expectedFolders, - string expectedDocumentName, - CodeAction action) - { - var operations = await VerifyActionAndGetOperationsAsync(workspace, action, default); - return await TestAddDocument( - workspace, - expectedMarkup, - operations, - hasProjectChange: false, - modifiedProjectId: null, - expectedFolders: expectedFolders, - expectedDocumentName: expectedDocumentName); - } - - protected async Task> TestAddDocument( - TestWorkspace workspace, - string expected, - ImmutableArray operations, - bool hasProjectChange, - ProjectId modifiedProjectId, - ImmutableArray expectedFolders, - string expectedDocumentName) - { - var appliedChanges = ApplyOperationsAndGetSolution(workspace, operations); - var oldSolution = appliedChanges.Item1; - var newSolution = appliedChanges.Item2; - - Document addedDocument = null; - if (!hasProjectChange) - { - addedDocument = SolutionUtilities.GetSingleAddedDocument(oldSolution, newSolution); - } - else - { - Assert.NotNull(modifiedProjectId); - addedDocument = newSolution.GetProject(modifiedProjectId).Documents.SingleOrDefault(doc => doc.Name == expectedDocumentName); - } - - Assert.NotNull(addedDocument); - - AssertEx.Equal(expectedFolders, addedDocument.Folders); - Assert.Equal(expectedDocumentName, addedDocument.Name); - Assert.Equal(expected, (await addedDocument.GetTextAsync()).ToString()); - - var editHandler = workspace.ExportProvider.GetExportedValue(); - if (!hasProjectChange) - { - // If there is just one document change then we expect the preview to be a WpfTextView - var content = (await editHandler.GetPreviews(workspace, operations, CancellationToken.None).GetPreviewsAsync())[0]; - using (var diffView = content as DifferenceViewerPreview) - { - Assert.NotNull(diffView.Viewer); - } - } - else - { - // If there are more changes than just the document we need to browse all the changes and get the document change - var contents = editHandler.GetPreviews(workspace, operations, CancellationToken.None); - var hasPreview = false; - var previews = await contents.GetPreviewsAsync(); - if (previews != null) - { - foreach (var preview in previews) - { - if (preview != null) - { - var diffView = preview as DifferenceViewerPreview; - if (diffView?.Viewer != null) - { - hasPreview = true; - diffView.Dispose(); - break; - } - } - } - } - - Assert.True(hasPreview); - } - - return Tuple.Create(oldSolution, newSolution); - } - internal Task TestInRegularAndScriptAsync( string initialMarkup, string expectedMarkup, @@ -343,20 +342,19 @@ internal Task TestInRegularAndScriptAsync( string title = null) { return TestInRegularAndScript1Async( - initialMarkup, expectedMarkup, index, priority, - new TestParameters(parseOptions, compilationOptions, options, fixProviderData, index, title: title)); + initialMarkup, expectedMarkup, index, + new TestParameters(parseOptions, compilationOptions, options, fixProviderData, index, priority, title: title)); } internal async Task TestInRegularAndScript1Async( string initialMarkup, string expectedMarkup, int index = 0, - CodeActionPriority? priority = null, TestParameters parameters = default) { parameters = parameters.WithIndex(index); - await TestAsync(initialMarkup, expectedMarkup, priority, WithRegularOptions(parameters)); - await TestAsync(initialMarkup, expectedMarkup, priority, WithScriptOptions(parameters)); + await TestAsync(initialMarkup, expectedMarkup, WithRegularOptions(parameters)); + await TestAsync(initialMarkup, expectedMarkup, WithScriptOptions(parameters)); } internal Task TestAsync( @@ -369,15 +367,14 @@ internal Task TestAsync( { return TestAsync( initialMarkup, - expectedMarkup, priority, + expectedMarkup, new TestParameters( - parseOptions, compilationOptions, options, fixProviderData, index)); + parseOptions, compilationOptions, options, fixProviderData, index, priority)); } private async Task TestAsync( string initialMarkup, string expectedMarkup, - CodeActionPriority? priority, TestParameters parameters) { MarkupTestFile.GetSpans( @@ -623,9 +620,17 @@ private static async Task VerifyAgainstWorkspaceDefinitionAsync(string expectedT foreach (var analyzerConfigDoc in project.AnalyzerConfigDocuments) { var root = await analyzerConfigDoc.GetTextAsync(); + var actualString = root.ToString(); + if (actualString.StartsWith(AutoGeneratedAnalyzerConfigHeader)) + { + // Skip validation for analyzer config file that is auto-generated by test framework + // for applying code style options. + continue; + } + var expectedDocument = expectedProject.AnalyzerConfigDocuments.Single(d => d.FilePath == analyzerConfigDoc.FilePath); var expectedRoot = await expectedDocument.GetTextAsync(); - VerifyExpectedDocumentText(expectedRoot.ToString(), root.ToString()); + VerifyExpectedDocumentText(expectedRoot.ToString(), actualString); } } } diff --git a/src/EditorFeatures/DiagnosticsTestUtilities/CodeActions/AbstractCodeActionOrUserDiagnosticTest_TestAddDocument.cs b/src/EditorFeatures/DiagnosticsTestUtilities/CodeActions/AbstractCodeActionOrUserDiagnosticTest_TestAddDocument.cs new file mode 100644 index 0000000000000..592d6b2fe9f88 --- /dev/null +++ b/src/EditorFeatures/DiagnosticsTestUtilities/CodeActions/AbstractCodeActionOrUserDiagnosticTest_TestAddDocument.cs @@ -0,0 +1,153 @@ +// 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.Collections.Immutable; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.CodeAnalysis.CodeActions; +using Microsoft.CodeAnalysis.Editor.Implementation.Preview; +using Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces; +using Microsoft.CodeAnalysis.UnitTests; +using Roslyn.Test.Utilities; +using Xunit; + +namespace Microsoft.CodeAnalysis.Editor.UnitTests.CodeActions +{ + public abstract partial class AbstractCodeActionOrUserDiagnosticTest + { + protected async Task TestAddDocumentInRegularAndScriptAsync( + string initialMarkup, string expectedMarkup, + ImmutableArray expectedContainers, + string expectedDocumentName, + TestParameters parameters = default) + { + await TestAddDocument( + initialMarkup, expectedMarkup, + expectedContainers, expectedDocumentName, + WithRegularOptions(parameters)); + await TestAddDocument( + initialMarkup, expectedMarkup, + expectedContainers, expectedDocumentName, + WithScriptOptions(parameters)); + } + + protected async Task> TestAddDocumentAsync( + TestParameters parameters, + TestWorkspace workspace, + string expectedMarkup, + string expectedDocumentName, + ImmutableArray expectedContainers) + { + var (_, action) = await GetCodeActionsAsync(workspace, parameters); + return await TestAddDocument( + workspace, expectedMarkup, expectedContainers, + expectedDocumentName, action); + } + + protected async Task TestAddDocument( + string initialMarkup, + string expectedMarkup, + ImmutableArray expectedContainers, + string expectedDocumentName, + TestParameters parameters = default) + { + using (var workspace = CreateWorkspaceFromOptions(initialMarkup, parameters)) + { + var (_, action) = await GetCodeActionsAsync(workspace, parameters); + await TestAddDocument( + workspace, expectedMarkup, expectedContainers, + expectedDocumentName, action); + } + } + + private async Task> TestAddDocument( + TestWorkspace workspace, + string expectedMarkup, + ImmutableArray expectedFolders, + string expectedDocumentName, + CodeAction action) + { + var operations = await VerifyActionAndGetOperationsAsync(workspace, action, default); + return await TestAddDocument( + workspace, + expectedMarkup, + operations, + hasProjectChange: false, + modifiedProjectId: null, + expectedFolders: expectedFolders, + expectedDocumentName: expectedDocumentName); + } + + protected async Task> TestAddDocument( + TestWorkspace workspace, + string expected, + ImmutableArray operations, + bool hasProjectChange, + ProjectId modifiedProjectId, + ImmutableArray expectedFolders, + string expectedDocumentName) + { + var appliedChanges = ApplyOperationsAndGetSolution(workspace, operations); + var oldSolution = appliedChanges.Item1; + var newSolution = appliedChanges.Item2; + + Document addedDocument = null; + if (!hasProjectChange) + { + addedDocument = SolutionUtilities.GetSingleAddedDocument(oldSolution, newSolution); + } + else + { + Assert.NotNull(modifiedProjectId); + addedDocument = newSolution.GetProject(modifiedProjectId).Documents.SingleOrDefault(doc => doc.Name == expectedDocumentName); + } + + Assert.NotNull(addedDocument); + + AssertEx.Equal(expectedFolders, addedDocument.Folders); + Assert.Equal(expectedDocumentName, addedDocument.Name); + Assert.Equal(expected, (await addedDocument.GetTextAsync()).ToString()); + + var editHandler = workspace.ExportProvider.GetExportedValue(); + if (!hasProjectChange) + { + // If there is just one document change then we expect the preview to be a WpfTextView + var content = (await editHandler.GetPreviews(workspace, operations, CancellationToken.None).GetPreviewsAsync())[0]; + using (var diffView = content as DifferenceViewerPreview) + { + Assert.NotNull(diffView.Viewer); + } + } + else + { + // If there are more changes than just the document we need to browse all the changes and get the document change + var contents = editHandler.GetPreviews(workspace, operations, CancellationToken.None); + var hasPreview = false; + var previews = await contents.GetPreviewsAsync(); + if (previews != null) + { + foreach (var preview in previews) + { + if (preview != null) + { + var diffView = preview as DifferenceViewerPreview; + if (diffView?.Viewer != null) + { + hasPreview = true; + diffView.Dispose(); + break; + } + } + } + } + + Assert.True(hasPreview); + } + + return Tuple.Create(oldSolution, newSolution); + } + } +} diff --git a/src/EditorFeatures/TestUtilities/CodeActions/AbstractCodeActionTest.cs b/src/EditorFeatures/DiagnosticsTestUtilities/CodeActions/AbstractCodeActionTest.cs similarity index 97% rename from src/EditorFeatures/TestUtilities/CodeActions/AbstractCodeActionTest.cs rename to src/EditorFeatures/DiagnosticsTestUtilities/CodeActions/AbstractCodeActionTest.cs index ec304ac871736..f1ff9d4cb98e4 100644 --- a/src/EditorFeatures/TestUtilities/CodeActions/AbstractCodeActionTest.cs +++ b/src/EditorFeatures/DiagnosticsTestUtilities/CodeActions/AbstractCodeActionTest.cs @@ -23,7 +23,7 @@ namespace Microsoft.CodeAnalysis.Editor.UnitTests.CodeActions { - public abstract class AbstractCodeActionTest : AbstractCodeActionOrUserDiagnosticTest + public abstract partial class AbstractCodeActionTest : AbstractCodeActionOrUserDiagnosticTest { protected abstract CodeRefactoringProvider CreateCodeRefactoringProvider( Workspace workspace, TestParameters parameters); @@ -167,13 +167,12 @@ internal Task TestWithPickMembersDialogAsync( string[] chosenSymbols, Action> optionsCallback = null, int index = 0, - CodeActionPriority? priority = null, TestParameters parameters = default) { var pickMembersService = new TestPickMembersService(chosenSymbols.AsImmutableOrNull(), optionsCallback); return TestInRegularAndScript1Async( initialMarkup, expectedMarkup, - index, priority, + index, parameters.WithFixProviderData(pickMembersService)); } } diff --git a/src/EditorFeatures/TestUtilities/Diagnostics/AbstractDiagnosticProviderBasedUserDiagnosticTest.cs b/src/EditorFeatures/DiagnosticsTestUtilities/Diagnostics/AbstractDiagnosticProviderBasedUserDiagnosticTest.cs similarity index 76% rename from src/EditorFeatures/TestUtilities/Diagnostics/AbstractDiagnosticProviderBasedUserDiagnosticTest.cs rename to src/EditorFeatures/DiagnosticsTestUtilities/Diagnostics/AbstractDiagnosticProviderBasedUserDiagnosticTest.cs index 74fffdf3e5074..1b9c99e47a051 100644 --- a/src/EditorFeatures/TestUtilities/Diagnostics/AbstractDiagnosticProviderBasedUserDiagnosticTest.cs +++ b/src/EditorFeatures/DiagnosticsTestUtilities/Diagnostics/AbstractDiagnosticProviderBasedUserDiagnosticTest.cs @@ -2,7 +2,6 @@ // 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.Collections.Concurrent; using System.Collections.Generic; using System.Collections.Immutable; @@ -10,19 +9,23 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis.CodeActions; using Microsoft.CodeAnalysis.CodeFixes; -using Microsoft.CodeAnalysis.CodeStyle; using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces; -using Microsoft.CodeAnalysis.Options; using Microsoft.CodeAnalysis.Text; using Microsoft.CodeAnalysis.UnitTests.Diagnostics; using Roslyn.Test.Utilities; using Roslyn.Utilities; using Xunit; +#if CODE_STYLE +using Microsoft.CodeAnalysis.Internal.Options; +#else +using Microsoft.CodeAnalysis.Options; +#endif + namespace Microsoft.CodeAnalysis.Editor.UnitTests.Diagnostics { - public abstract class AbstractDiagnosticProviderBasedUserDiagnosticTest : AbstractUserDiagnosticTest + public abstract partial class AbstractDiagnosticProviderBasedUserDiagnosticTest : AbstractUserDiagnosticTest { private readonly ConcurrentDictionary _analyzerAndFixerMap = new ConcurrentDictionary(); @@ -224,56 +227,5 @@ private void AssertNoAnalyzerExceptionDiagnostics(IEnumerable diagno var analyzerExceptionDiagnostics = diagnostics.Where(diag => diag.Descriptor.CustomTags.Contains(WellKnownDiagnosticTags.AnalyzerException)); AssertEx.Empty(analyzerExceptionDiagnostics, "Found analyzer exception diagnostics"); } - - #region Parentheses options - - private static readonly CodeStyleOption IgnorePreference = - new CodeStyleOption(ParenthesesPreference.AlwaysForClarity, NotificationOption.None); - - private static readonly CodeStyleOption RequireForPrecedenceClarityPreference = - new CodeStyleOption(ParenthesesPreference.AlwaysForClarity, NotificationOption.Suggestion); - - private static readonly CodeStyleOption RemoveIfUnnecessaryPreference = - new CodeStyleOption(ParenthesesPreference.NeverIfUnnecessary, NotificationOption.Suggestion); - - private static IEnumerable>> GetAllExceptOtherParenthesesOptions() - { - yield return CodeStyleOptions.ArithmeticBinaryParentheses; - yield return CodeStyleOptions.RelationalBinaryParentheses; - yield return CodeStyleOptions.OtherBinaryParentheses; - } - - protected IDictionary RequireArithmeticBinaryParenthesesForClarity - => GetSingleRequireOption(CodeStyleOptions.ArithmeticBinaryParentheses); - - protected IDictionary RequireRelationalBinaryParenthesesForClarity - => GetSingleRequireOption(CodeStyleOptions.RelationalBinaryParentheses); - - protected IDictionary RequireOtherBinaryParenthesesForClarity - => GetSingleRequireOption(CodeStyleOptions.OtherBinaryParentheses); - - private IEnumerable>> GetAllParenthesesOptions() - => GetAllExceptOtherParenthesesOptions().Concat(CodeStyleOptions.OtherParentheses); - - protected IDictionary IgnoreAllParentheses - => OptionsSet(GetAllParenthesesOptions().Select( - o => SingleOption(o, IgnorePreference)).ToArray()); - - protected IDictionary RemoveAllUnnecessaryParentheses - => OptionsSet(GetAllParenthesesOptions().Select( - o => SingleOption(o, RemoveIfUnnecessaryPreference)).ToArray()); - - protected IDictionary RequireAllParenthesesForClarity - => OptionsSet(GetAllExceptOtherParenthesesOptions() - .Select(o => SingleOption(o, RequireForPrecedenceClarityPreference)) - .Concat(SingleOption(CodeStyleOptions.OtherParentheses, RemoveIfUnnecessaryPreference)).ToArray()); - - private IDictionary GetSingleRequireOption(PerLanguageOption> option) - => OptionsSet(GetAllParenthesesOptions() - .Where(o => o != option) - .Select(o => SingleOption(o, RemoveIfUnnecessaryPreference)) - .Concat(SingleOption(option, RequireForPrecedenceClarityPreference)).ToArray()); - - #endregion } } diff --git a/src/EditorFeatures/DiagnosticsTestUtilities/Diagnostics/AbstractDiagnosticProviderBasedUserDiagnosticTest_ParenthesesOptions.cs b/src/EditorFeatures/DiagnosticsTestUtilities/Diagnostics/AbstractDiagnosticProviderBasedUserDiagnosticTest_ParenthesesOptions.cs new file mode 100644 index 0000000000000..f8c83823fc3c1 --- /dev/null +++ b/src/EditorFeatures/DiagnosticsTestUtilities/Diagnostics/AbstractDiagnosticProviderBasedUserDiagnosticTest_ParenthesesOptions.cs @@ -0,0 +1,66 @@ +// 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.Collections.Generic; +using System.Linq; +using Microsoft.CodeAnalysis.CodeStyle; +using Microsoft.CodeAnalysis.Options; +using Roslyn.Utilities; + +namespace Microsoft.CodeAnalysis.Editor.UnitTests.Diagnostics +{ + public abstract partial class AbstractDiagnosticProviderBasedUserDiagnosticTest : AbstractUserDiagnosticTest + { + #region Parentheses options + + private static readonly CodeStyleOption IgnorePreference = + new CodeStyleOption(ParenthesesPreference.AlwaysForClarity, NotificationOption.None); + + private static readonly CodeStyleOption RequireForPrecedenceClarityPreference = + new CodeStyleOption(ParenthesesPreference.AlwaysForClarity, NotificationOption.Suggestion); + + private static readonly CodeStyleOption RemoveIfUnnecessaryPreference = + new CodeStyleOption(ParenthesesPreference.NeverIfUnnecessary, NotificationOption.Suggestion); + + private static IEnumerable>> GetAllExceptOtherParenthesesOptions() + { + yield return CodeStyleOptions.ArithmeticBinaryParentheses; + yield return CodeStyleOptions.RelationalBinaryParentheses; + yield return CodeStyleOptions.OtherBinaryParentheses; + } + + protected IDictionary RequireArithmeticBinaryParenthesesForClarity + => GetSingleRequireOption(CodeStyleOptions.ArithmeticBinaryParentheses); + + protected IDictionary RequireRelationalBinaryParenthesesForClarity + => GetSingleRequireOption(CodeStyleOptions.RelationalBinaryParentheses); + + protected IDictionary RequireOtherBinaryParenthesesForClarity + => GetSingleRequireOption(CodeStyleOptions.OtherBinaryParentheses); + + private IEnumerable>> GetAllParenthesesOptions() + => GetAllExceptOtherParenthesesOptions().Concat(CodeStyleOptions.OtherParentheses); + + protected IDictionary IgnoreAllParentheses + => OptionsSet(GetAllParenthesesOptions().Select( + o => SingleOption(o, IgnorePreference)).ToArray()); + + protected IDictionary RemoveAllUnnecessaryParentheses + => OptionsSet(GetAllParenthesesOptions().Select( + o => SingleOption(o, RemoveIfUnnecessaryPreference)).ToArray()); + + protected IDictionary RequireAllParenthesesForClarity + => OptionsSet(GetAllExceptOtherParenthesesOptions() + .Select(o => SingleOption(o, RequireForPrecedenceClarityPreference)) + .Concat(SingleOption(CodeStyleOptions.OtherParentheses, RemoveIfUnnecessaryPreference)).ToArray()); + + private IDictionary GetSingleRequireOption(PerLanguageOption> option) + => OptionsSet(GetAllParenthesesOptions() + .Where(o => o != option) + .Select(o => SingleOption(o, RemoveIfUnnecessaryPreference)) + .Concat(SingleOption(option, RequireForPrecedenceClarityPreference)).ToArray()); + + #endregion + } +} diff --git a/src/EditorFeatures/TestUtilities/Diagnostics/AbstractSuppressionAllCodeTests.cs b/src/EditorFeatures/DiagnosticsTestUtilities/Diagnostics/AbstractSuppressionAllCodeTests.cs similarity index 100% rename from src/EditorFeatures/TestUtilities/Diagnostics/AbstractSuppressionAllCodeTests.cs rename to src/EditorFeatures/DiagnosticsTestUtilities/Diagnostics/AbstractSuppressionAllCodeTests.cs diff --git a/src/EditorFeatures/TestUtilities/Diagnostics/AbstractSuppressionDiagnosticTest.cs b/src/EditorFeatures/DiagnosticsTestUtilities/Diagnostics/AbstractSuppressionDiagnosticTest.cs similarity index 100% rename from src/EditorFeatures/TestUtilities/Diagnostics/AbstractSuppressionDiagnosticTest.cs rename to src/EditorFeatures/DiagnosticsTestUtilities/Diagnostics/AbstractSuppressionDiagnosticTest.cs diff --git a/src/EditorFeatures/TestUtilities/Diagnostics/FixAllDiagnosticProvider.cs b/src/EditorFeatures/DiagnosticsTestUtilities/Diagnostics/AbstractUserDiagnosticTest.FixAllDiagnosticProvider.cs similarity index 100% rename from src/EditorFeatures/TestUtilities/Diagnostics/FixAllDiagnosticProvider.cs rename to src/EditorFeatures/DiagnosticsTestUtilities/Diagnostics/AbstractUserDiagnosticTest.FixAllDiagnosticProvider.cs diff --git a/src/EditorFeatures/TestUtilities/Diagnostics/AbstractUserDiagnosticTest.cs b/src/EditorFeatures/DiagnosticsTestUtilities/Diagnostics/AbstractUserDiagnosticTest.cs similarity index 62% rename from src/EditorFeatures/TestUtilities/Diagnostics/AbstractUserDiagnosticTest.cs rename to src/EditorFeatures/DiagnosticsTestUtilities/Diagnostics/AbstractUserDiagnosticTest.cs index 07be82e324fa4..95c66312507b3 100644 --- a/src/EditorFeatures/TestUtilities/Diagnostics/AbstractUserDiagnosticTest.cs +++ b/src/EditorFeatures/DiagnosticsTestUtilities/Diagnostics/AbstractUserDiagnosticTest.cs @@ -11,23 +11,22 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis.CodeActions; using Microsoft.CodeAnalysis.CodeFixes; -using Microsoft.CodeAnalysis.CodeFixes.Suppression; -using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Editor.UnitTests.CodeActions; -using Microsoft.CodeAnalysis.Editor.UnitTests.Diagnostics.GenerateType; using Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces; -using Microsoft.CodeAnalysis.GenerateType; -using Microsoft.CodeAnalysis.Options; -using Microsoft.CodeAnalysis.PooledObjects; using Microsoft.CodeAnalysis.Shared.Utilities; using Microsoft.CodeAnalysis.Test.Utilities; using Microsoft.CodeAnalysis.Text; -using Microsoft.CodeAnalysis.UnitTests; using Microsoft.CodeAnalysis.UnitTests.Diagnostics; using Roslyn.Test.Utilities; using Roslyn.Utilities; using Xunit; +#if CODE_STYLE +using Microsoft.CodeAnalysis.Internal.Options; +#else +using Microsoft.CodeAnalysis.Options; +#endif + namespace Microsoft.CodeAnalysis.Editor.UnitTests.Diagnostics { public abstract partial class AbstractUserDiagnosticTest : AbstractCodeActionOrUserDiagnosticTest @@ -293,158 +292,5 @@ internal async Task TestSpansAsync( Assert.True(expectedTextSpans.SetEquals(actualTextSpans)); } - - internal async Task TestWithMockedGenerateTypeDialog( - string initial, - string languageName, - string typeName, - string expected = null, - bool isMissing = false, - Accessibility accessibility = Accessibility.NotApplicable, - TypeKind typeKind = TypeKind.Class, - string projectName = null, - bool isNewFile = false, - string existingFilename = null, - ImmutableArray newFileFolderContainers = default, - string fullFilePath = null, - string newFileName = null, - string assertClassName = null, - bool checkIfUsingsIncluded = false, - bool checkIfUsingsNotIncluded = false, - string expectedTextWithUsings = null, - string defaultNamespace = "", - bool areFoldersValidIdentifiers = true, - GenerateTypeDialogOptions assertGenerateTypeDialogOptions = null, - IList assertTypeKindPresent = null, - IList assertTypeKindAbsent = null, - bool isCancelled = false) - { - using var testState = GenerateTypeTestState.Create(initial, projectName, typeName, existingFilename, languageName); - - // Initialize the viewModel values - testState.TestGenerateTypeOptionsService.SetGenerateTypeOptions( - accessibility: accessibility, - typeKind: typeKind, - typeName: testState.TypeName, - project: testState.ProjectToBeModified, - isNewFile: isNewFile, - newFileName: newFileName, - folders: newFileFolderContainers, - fullFilePath: fullFilePath, - existingDocument: testState.ExistingDocument, - areFoldersValidIdentifiers: areFoldersValidIdentifiers, - isCancelled: isCancelled); - - testState.TestProjectManagementService.SetDefaultNamespace( - defaultNamespace: defaultNamespace); - - var testOptions = new TestParameters(); - var (diagnostics, actions, _) = await GetDiagnosticAndFixesAsync(testState.Workspace, testOptions); - var generateTypeDiagFixes = diagnostics.SingleOrDefault(df => GenerateTypeTestState.FixIds.Contains(df.Id)); - - if (isMissing) - { - Assert.Empty(actions); - return; - } - - var fixActions = MassageActions(actions); - Assert.NotNull(fixActions); - - // Since the dialog option is always fed as the last CodeAction - var index = fixActions.Count() - 1; - var action = fixActions.ElementAt(index); - - Assert.Equal(action.Title, FeaturesResources.Generate_new_type); - var operations = await action.GetOperationsAsync(CancellationToken.None); - Tuple oldSolutionAndNewSolution = null; - - if (!isNewFile) - { - oldSolutionAndNewSolution = await TestOperationsAsync( - testState.Workspace, expected, operations, - conflictSpans: ImmutableArray.Empty, - renameSpans: ImmutableArray.Empty, - warningSpans: ImmutableArray.Empty, - navigationSpans: ImmutableArray.Empty, - expectedChangedDocumentId: testState.ExistingDocument.Id); - } - else - { - oldSolutionAndNewSolution = await TestAddDocument( - testState.Workspace, - expected, - operations, - projectName != null, - testState.ProjectToBeModified.Id, - newFileFolderContainers, - newFileName); - } - - if (checkIfUsingsIncluded) - { - Assert.NotNull(expectedTextWithUsings); - await TestOperationsAsync(testState.Workspace, expectedTextWithUsings, operations, - conflictSpans: ImmutableArray.Empty, - renameSpans: ImmutableArray.Empty, - warningSpans: ImmutableArray.Empty, - navigationSpans: ImmutableArray.Empty, - expectedChangedDocumentId: testState.InvocationDocument.Id); - } - - if (checkIfUsingsNotIncluded) - { - var oldSolution = oldSolutionAndNewSolution.Item1; - var newSolution = oldSolutionAndNewSolution.Item2; - var changedDocumentIds = SolutionUtilities.GetChangedDocuments(oldSolution, newSolution); - - Assert.False(changedDocumentIds.Contains(testState.InvocationDocument.Id)); - } - - // Added into a different project than the triggering project - if (projectName != null) - { - var appliedChanges = ApplyOperationsAndGetSolution(testState.Workspace, operations); - var newSolution = appliedChanges.Item2; - var triggeredProject = newSolution.GetProject(testState.TriggeredProject.Id); - - // Make sure the Project reference is present - Assert.True(triggeredProject.ProjectReferences.Any(pr => pr.ProjectId == testState.ProjectToBeModified.Id)); - } - - // Assert Option Calculation - if (assertClassName != null) - { - Assert.True(assertClassName == testState.TestGenerateTypeOptionsService.ClassName); - } - - if (assertGenerateTypeDialogOptions != null || assertTypeKindPresent != null || assertTypeKindAbsent != null) - { - var generateTypeDialogOptions = testState.TestGenerateTypeOptionsService.GenerateTypeDialogOptions; - - if (assertGenerateTypeDialogOptions != null) - { - Assert.True(assertGenerateTypeDialogOptions.IsPublicOnlyAccessibility == generateTypeDialogOptions.IsPublicOnlyAccessibility); - Assert.True(assertGenerateTypeDialogOptions.TypeKindOptions == generateTypeDialogOptions.TypeKindOptions); - Assert.True(assertGenerateTypeDialogOptions.IsAttribute == generateTypeDialogOptions.IsAttribute); - } - - if (assertTypeKindPresent != null) - { - foreach (var typeKindPresentEach in assertTypeKindPresent) - { - Assert.True((typeKindPresentEach & generateTypeDialogOptions.TypeKindOptions) != 0); - } - } - - if (assertTypeKindAbsent != null) - { - foreach (var typeKindPresentEach in assertTypeKindAbsent) - { - Assert.True((typeKindPresentEach & generateTypeDialogOptions.TypeKindOptions) == 0); - } - } - } - } } } diff --git a/src/EditorFeatures/DiagnosticsTestUtilities/Diagnostics/AbstractUserDiagnosticTest_GenerateTypeDialog.cs b/src/EditorFeatures/DiagnosticsTestUtilities/Diagnostics/AbstractUserDiagnosticTest_GenerateTypeDialog.cs new file mode 100644 index 0000000000000..c521b86eaf07e --- /dev/null +++ b/src/EditorFeatures/DiagnosticsTestUtilities/Diagnostics/AbstractUserDiagnosticTest_GenerateTypeDialog.cs @@ -0,0 +1,176 @@ +// 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.Collections.Generic; +using System.Collections.Immutable; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.CodeAnalysis.Editor.UnitTests.CodeActions; +using Microsoft.CodeAnalysis.Editor.UnitTests.Diagnostics.GenerateType; +using Microsoft.CodeAnalysis.GenerateType; +using Microsoft.CodeAnalysis.Text; +using Microsoft.CodeAnalysis.UnitTests; +using Roslyn.Utilities; +using Xunit; + +namespace Microsoft.CodeAnalysis.Editor.UnitTests.Diagnostics +{ + public abstract partial class AbstractUserDiagnosticTest : AbstractCodeActionOrUserDiagnosticTest + { + internal async Task TestWithMockedGenerateTypeDialog( + string initial, + string languageName, + string typeName, + string expected = null, + bool isMissing = false, + Accessibility accessibility = Accessibility.NotApplicable, + TypeKind typeKind = TypeKind.Class, + string projectName = null, + bool isNewFile = false, + string existingFilename = null, + ImmutableArray newFileFolderContainers = default, + string fullFilePath = null, + string newFileName = null, + string assertClassName = null, + bool checkIfUsingsIncluded = false, + bool checkIfUsingsNotIncluded = false, + string expectedTextWithUsings = null, + string defaultNamespace = "", + bool areFoldersValidIdentifiers = true, + GenerateTypeDialogOptions assertGenerateTypeDialogOptions = null, + IList assertTypeKindPresent = null, + IList assertTypeKindAbsent = null, + bool isCancelled = false) + { + using var testState = GenerateTypeTestState.Create(initial, projectName, typeName, existingFilename, languageName); + + // Initialize the viewModel values + testState.TestGenerateTypeOptionsService.SetGenerateTypeOptions( + accessibility: accessibility, + typeKind: typeKind, + typeName: testState.TypeName, + project: testState.ProjectToBeModified, + isNewFile: isNewFile, + newFileName: newFileName, + folders: newFileFolderContainers, + fullFilePath: fullFilePath, + existingDocument: testState.ExistingDocument, + areFoldersValidIdentifiers: areFoldersValidIdentifiers, + isCancelled: isCancelled); + + testState.TestProjectManagementService.SetDefaultNamespace( + defaultNamespace: defaultNamespace); + + var testOptions = new TestParameters(); + var (diagnostics, actions, _) = await GetDiagnosticAndFixesAsync(testState.Workspace, testOptions); + var generateTypeDiagFixes = diagnostics.SingleOrDefault(df => GenerateTypeTestState.FixIds.Contains(df.Id)); + + if (isMissing) + { + Assert.Empty(actions); + return; + } + + var fixActions = MassageActions(actions); + Assert.False(fixActions.IsDefault); + + // Since the dialog option is always fed as the last CodeAction + var index = fixActions.Count() - 1; + var action = fixActions.ElementAt(index); + + Assert.Equal(action.Title, FeaturesResources.Generate_new_type); + var operations = await action.GetOperationsAsync(CancellationToken.None); + Tuple oldSolutionAndNewSolution = null; + + if (!isNewFile) + { + oldSolutionAndNewSolution = await TestOperationsAsync( + testState.Workspace, expected, operations, + conflictSpans: ImmutableArray.Empty, + renameSpans: ImmutableArray.Empty, + warningSpans: ImmutableArray.Empty, + navigationSpans: ImmutableArray.Empty, + expectedChangedDocumentId: testState.ExistingDocument.Id); + } + else + { + oldSolutionAndNewSolution = await TestAddDocument( + testState.Workspace, + expected, + operations, + projectName != null, + testState.ProjectToBeModified.Id, + newFileFolderContainers, + newFileName); + } + + if (checkIfUsingsIncluded) + { + Assert.NotNull(expectedTextWithUsings); + await TestOperationsAsync(testState.Workspace, expectedTextWithUsings, operations, + conflictSpans: ImmutableArray.Empty, + renameSpans: ImmutableArray.Empty, + warningSpans: ImmutableArray.Empty, + navigationSpans: ImmutableArray.Empty, + expectedChangedDocumentId: testState.InvocationDocument.Id); + } + + if (checkIfUsingsNotIncluded) + { + var oldSolution = oldSolutionAndNewSolution.Item1; + var newSolution = oldSolutionAndNewSolution.Item2; + var changedDocumentIds = SolutionUtilities.GetChangedDocuments(oldSolution, newSolution); + + Assert.False(changedDocumentIds.Contains(testState.InvocationDocument.Id)); + } + + // Added into a different project than the triggering project + if (projectName != null) + { + var appliedChanges = ApplyOperationsAndGetSolution(testState.Workspace, operations); + var newSolution = appliedChanges.Item2; + var triggeredProject = newSolution.GetProject(testState.TriggeredProject.Id); + + // Make sure the Project reference is present + Assert.True(triggeredProject.ProjectReferences.Any(pr => pr.ProjectId == testState.ProjectToBeModified.Id)); + } + + // Assert Option Calculation + if (assertClassName != null) + { + Assert.True(assertClassName == testState.TestGenerateTypeOptionsService.ClassName); + } + + if (assertGenerateTypeDialogOptions != null || assertTypeKindPresent != null || assertTypeKindAbsent != null) + { + var generateTypeDialogOptions = testState.TestGenerateTypeOptionsService.GenerateTypeDialogOptions; + + if (assertGenerateTypeDialogOptions != null) + { + Assert.True(assertGenerateTypeDialogOptions.IsPublicOnlyAccessibility == generateTypeDialogOptions.IsPublicOnlyAccessibility); + Assert.True(assertGenerateTypeDialogOptions.TypeKindOptions == generateTypeDialogOptions.TypeKindOptions); + Assert.True(assertGenerateTypeDialogOptions.IsAttribute == generateTypeDialogOptions.IsAttribute); + } + + if (assertTypeKindPresent != null) + { + foreach (var typeKindPresentEach in assertTypeKindPresent) + { + Assert.True((typeKindPresentEach & generateTypeDialogOptions.TypeKindOptions) != 0); + } + } + + if (assertTypeKindAbsent != null) + { + foreach (var typeKindPresentEach in assertTypeKindAbsent) + { + Assert.True((typeKindPresentEach & generateTypeDialogOptions.TypeKindOptions) == 0); + } + } + } + } + } +} diff --git a/src/EditorFeatures/DiagnosticsTestUtilities/Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities.csproj b/src/EditorFeatures/DiagnosticsTestUtilities/Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities.csproj new file mode 100644 index 0000000000000..b33cff258d214 --- /dev/null +++ b/src/EditorFeatures/DiagnosticsTestUtilities/Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities.csproj @@ -0,0 +1,62 @@ + + + + + Library + Microsoft.CodeAnalysis.Test.Utilities + net472 + true + true + false + + + + + + + + + + + + + + + global,WORKSPACES + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/EditorFeatures/TestUtilities/MoveToNamespace/AbstractMoveToNamespaceTests.TestState.cs b/src/EditorFeatures/DiagnosticsTestUtilities/MoveToNamespace/AbstractMoveToNamespaceTests.TestState.cs similarity index 100% rename from src/EditorFeatures/TestUtilities/MoveToNamespace/AbstractMoveToNamespaceTests.TestState.cs rename to src/EditorFeatures/DiagnosticsTestUtilities/MoveToNamespace/AbstractMoveToNamespaceTests.TestState.cs diff --git a/src/EditorFeatures/TestUtilities/MoveToNamespace/AbstractMoveToNamespaceTests.cs b/src/EditorFeatures/DiagnosticsTestUtilities/MoveToNamespace/AbstractMoveToNamespaceTests.cs similarity index 100% rename from src/EditorFeatures/TestUtilities/MoveToNamespace/AbstractMoveToNamespaceTests.cs rename to src/EditorFeatures/DiagnosticsTestUtilities/MoveToNamespace/AbstractMoveToNamespaceTests.cs diff --git a/src/EditorFeatures/TestUtilities/MoveType/AbstractMoveTypeTest.cs b/src/EditorFeatures/DiagnosticsTestUtilities/MoveType/AbstractMoveTypeTest.cs similarity index 100% rename from src/EditorFeatures/TestUtilities/MoveType/AbstractMoveTypeTest.cs rename to src/EditorFeatures/DiagnosticsTestUtilities/MoveType/AbstractMoveTypeTest.cs diff --git a/src/EditorFeatures/Test/Microsoft.CodeAnalysis.EditorFeatures.UnitTests.csproj b/src/EditorFeatures/Test/Microsoft.CodeAnalysis.EditorFeatures.UnitTests.csproj index 948e2be434df3..fcc4cfe2fd582 100644 --- a/src/EditorFeatures/Test/Microsoft.CodeAnalysis.EditorFeatures.UnitTests.csproj +++ b/src/EditorFeatures/Test/Microsoft.CodeAnalysis.EditorFeatures.UnitTests.csproj @@ -34,6 +34,7 @@ + diff --git a/src/EditorFeatures/TestUtilities/PullMemberUp/PullMemberUpCodeActionTest.cs b/src/EditorFeatures/TestUtilities/PullMemberUp/PullMemberUpCodeActionTest.cs deleted file mode 100644 index db345d237a8c0..0000000000000 --- a/src/EditorFeatures/TestUtilities/PullMemberUp/PullMemberUpCodeActionTest.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Collections.Generic; -using System.Threading.Tasks; -using Microsoft.CodeAnalysis.CodeActions; -using Microsoft.CodeAnalysis.Editor.UnitTests.CodeActions; - -namespace Microsoft.CodeAnalysis.Test.Utilities.PullMemberUp -{ - public abstract class PullMemberUpCodeActionTest : AbstractCodeActionTest - { - internal Task TestWithPullMemberDialogAsync( - string initialMarkUp, - string expectedResult, - IEnumerable<(string memberName, bool makeAbstract)> selection = null, - string target = null, - int index = 0, - CodeActionPriority? priority = null, - TestParameters parameters = default) - { - var service = new TestPullMemberUpService(selection, target); - - return TestInRegularAndScript1Async( - initialMarkUp, expectedResult, - index, priority, - parameters.WithFixProviderData(service)); - } - } -} diff --git a/src/EditorFeatures/TestUtilities/Roslyn.Services.Test.Utilities.csproj b/src/EditorFeatures/TestUtilities/Roslyn.Services.Test.Utilities.csproj index 9b15252cf1be4..02fa1e12ed867 100644 --- a/src/EditorFeatures/TestUtilities/Roslyn.Services.Test.Utilities.csproj +++ b/src/EditorFeatures/TestUtilities/Roslyn.Services.Test.Utilities.csproj @@ -98,6 +98,13 @@ + + + + + + + diff --git a/src/EditorFeatures/TestUtilities/Workspaces/TestHostProject.cs b/src/EditorFeatures/TestUtilities/Workspaces/TestHostProject.cs index d6334f9063827..a2e12211a78a2 100644 --- a/src/EditorFeatures/TestUtilities/Workspaces/TestHostProject.cs +++ b/src/EditorFeatures/TestUtilities/Workspaces/TestHostProject.cs @@ -27,7 +27,6 @@ public class TestHostProject private readonly string _assemblyName; private readonly Type _hostObjectType; private readonly VersionStamp _version; - private readonly string _filePath; private readonly string _outputFilePath; private readonly string _defaultNamespace; @@ -35,6 +34,7 @@ public class TestHostProject public IEnumerable AdditionalDocuments; public IEnumerable AnalyzerConfigDocuments; public IEnumerable ProjectReferences; + private string _filePath; public string Name { @@ -325,6 +325,9 @@ internal void RemoveAnalyzerConfigDocument(TestHostDocument document) this.AnalyzerConfigDocuments = this.AnalyzerConfigDocuments.Where(d => d != document); } + internal void OnProjectFilePathChanged(string filePath) + => _filePath = filePath; + public string Language { get diff --git a/src/EditorFeatures/TestUtilities/Workspaces/TestWorkspace.cs b/src/EditorFeatures/TestUtilities/Workspaces/TestWorkspace.cs index 35a6c8343268c..ef4e17acedda6 100644 --- a/src/EditorFeatures/TestUtilities/Workspaces/TestWorkspace.cs +++ b/src/EditorFeatures/TestUtilities/Workspaces/TestWorkspace.cs @@ -341,7 +341,7 @@ protected override void ApplyAnalyzerConfigDocumentTextChanged(DocumentId docume protected override void ApplyAnalyzerConfigDocumentAdded(DocumentInfo info, SourceText text) { var hostProject = this.GetTestProject(info.Id.ProjectId); - var hostDocument = new TestHostDocument(text.ToString(), info.Name, id: info.Id); + var hostDocument = new TestHostDocument(text.ToString(), info.Name, id: info.Id, filePath: info.FilePath, folders: info.Folders); hostProject.AddAnalyzerConfigDocument(hostDocument); this.OnAnalyzerConfigDocumentAdded(hostDocument.ToDocumentInfo()); } @@ -354,6 +354,18 @@ protected override void ApplyAnalyzerConfigDocumentRemoved(DocumentId documentId this.OnAnalyzerConfigDocumentRemoved(documentId); } + protected override void ApplyProjectChanges(ProjectChanges projectChanges) + { + if (projectChanges.OldProject.FilePath != projectChanges.NewProject.FilePath) + { + var hostProject = this.GetTestProject(projectChanges.NewProject.Id); + hostProject.OnProjectFilePathChanged(projectChanges.NewProject.FilePath); + base.OnProjectNameChanged(projectChanges.NewProject.Id, projectChanges.NewProject.Name, projectChanges.NewProject.FilePath); + } + + base.ApplyProjectChanges(projectChanges); + } + internal override void SetDocumentContext(DocumentId documentId) { OnDocumentContextUpdated(documentId); diff --git a/src/EditorFeatures/VisualBasicTest/Diagnostics/AddImport/AddImportTests.vb b/src/EditorFeatures/VisualBasicTest/Diagnostics/AddImport/AddImportTests.vb index 87e75428a4b81..a4b6d04f73902 100644 --- a/src/EditorFeatures/VisualBasicTest/Diagnostics/AddImport/AddImportTests.vb +++ b/src/EditorFeatures/VisualBasicTest/Diagnostics/AddImport/AddImportTests.vb @@ -32,10 +32,11 @@ Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.CodeActions.AddImp placeSystemFirst As Boolean, outOfProcess As Boolean) As Task Await TestInRegularAndScript1Async( - initialMarkup, expectedMarkup, index, priority, + initialMarkup, expectedMarkup, index, parameters:=New TestParameters( options:=[Option](GenerationOptions.PlaceSystemNamespaceFirst, placeSystemFirst), - fixProviderData:=outOfProcess)) + fixProviderData:=outOfProcess, + priority:=priority)) End Function End Class @@ -75,7 +76,7 @@ Namespace SomeNamespace End Namespace") End Function - + Public Async Function TestAddImportWithCaseChange() As Task Await TestAsync( diff --git a/src/EditorFeatures/VisualBasicTest/Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests.vbproj b/src/EditorFeatures/VisualBasicTest/Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests.vbproj index ebb61391ef3cb..a8289e092090d 100644 --- a/src/EditorFeatures/VisualBasicTest/Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests.vbproj +++ b/src/EditorFeatures/VisualBasicTest/Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests.vbproj @@ -37,6 +37,7 @@ + @@ -70,7 +71,7 @@ - + diff --git a/src/EditorFeatures/VisualBasicTest/Squiggles/ErrorSquiggleProducerTests.vb b/src/EditorFeatures/VisualBasicTest/Squiggles/ErrorSquiggleProducerTests.vb index 3ab2421034551..62e6e4fb02153 100644 --- a/src/EditorFeatures/VisualBasicTest/Squiggles/ErrorSquiggleProducerTests.vb +++ b/src/EditorFeatures/VisualBasicTest/Squiggles/ErrorSquiggleProducerTests.vb @@ -118,7 +118,7 @@ End Class" Dim second = spans(1) Assert.Equal(PredefinedErrorTypeNames.Suggestion, first.Tag.ErrorType) - Assert.Equal(VBFeaturesResources.Imports_statement_is_unnecessary, CType(first.Tag.ToolTipContent, String)) + Assert.Equal(VisualBasicAnalyzersResources.Imports_statement_is_unnecessary, CType(first.Tag.ToolTipContent, String)) Assert.Equal(Of Integer)(79, first.Span.Start) Assert.Equal(83, first.Span.Length) diff --git a/src/EditorFeatures/VisualBasicTest/Utils.vb b/src/EditorFeatures/VisualBasicTest/Utils.vb index d9ba459a327ed..a323d9d310eeb 100644 --- a/src/EditorFeatures/VisualBasicTest/Utils.vb +++ b/src/EditorFeatures/VisualBasicTest/Utils.vb @@ -112,8 +112,10 @@ Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests Private ReadOnly _node As T Sub New(syntaxTree As SyntaxTree, node As T) +#If Not CODE_STYLE Then Contract.ThrowIfNull(syntaxTree) Contract.ThrowIfNull(node) +#End If _tree = syntaxTree _node = node End Sub diff --git a/src/Features/CSharp/Portable/CSharpFeaturesResources.Designer.cs b/src/Features/CSharp/Portable/CSharpFeaturesResources.Designer.cs index c6dd0853355c9..bd269d2aa0fab 100644 --- a/src/Features/CSharp/Portable/CSharpFeaturesResources.Designer.cs +++ b/src/Features/CSharp/Portable/CSharpFeaturesResources.Designer.cs @@ -448,15 +448,6 @@ internal static string conversion_operator { } } - /// - /// Looks up a localized string similar to Convert switch statement to expression. - /// - internal static string Convert_switch_statement_to_expression { - get { - return ResourceManager.GetString("Convert_switch_statement_to_expression", resourceCulture); - } - } - /// /// Looks up a localized string similar to Convert to 'for'. /// @@ -1105,15 +1096,6 @@ internal static string Remove_unnecessary_casts { } } - /// - /// Looks up a localized string similar to Remove Unnecessary Usings. - /// - internal static string Remove_Unnecessary_Usings { - get { - return ResourceManager.GetString("Remove_Unnecessary_Usings", resourceCulture); - } - } - /// /// Looks up a localized string similar to Remove unused function. /// @@ -1440,33 +1422,6 @@ internal static string Use_0 { } } - /// - /// Looks up a localized string similar to Use explicit type. - /// - internal static string Use_explicit_type { - get { - return ResourceManager.GetString("Use_explicit_type", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Use explicit type instead of 'var'. - /// - internal static string Use_explicit_type_instead_of_var { - get { - return ResourceManager.GetString("Use_explicit_type_instead_of_var", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Use implicit type. - /// - internal static string Use_implicit_type { - get { - return ResourceManager.GetString("Use_implicit_type", resourceCulture); - } - } - /// /// Looks up a localized string similar to Use 'is null' check. /// @@ -1476,24 +1431,6 @@ internal static string Use_is_null_check { } } - /// - /// Looks up a localized string similar to Use 'switch' expression. - /// - internal static string Use_switch_expression { - get { - return ResourceManager.GetString("Use_switch_expression", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to use 'var' instead of explicit type. - /// - internal static string use_var_instead_of_explicit_type { - get { - return ResourceManager.GetString("use_var_instead_of_explicit_type", resourceCulture); - } - } - /// /// Looks up a localized string similar to using declaration. /// @@ -1512,15 +1449,6 @@ internal static string using_directive { } } - /// - /// Looks up a localized string similar to Using directive is unnecessary.. - /// - internal static string Using_directive_is_unnecessary { - get { - return ResourceManager.GetString("Using_directive_is_unnecessary", resourceCulture); - } - } - /// /// Looks up a localized string similar to Using directives must be placed inside of a namespace declaration. /// diff --git a/src/Features/CSharp/Portable/CSharpFeaturesResources.resx b/src/Features/CSharp/Portable/CSharpFeaturesResources.resx index 7a4ddbdd52562..c9339b6528a7f 100644 --- a/src/Features/CSharp/Portable/CSharpFeaturesResources.resx +++ b/src/Features/CSharp/Portable/CSharpFeaturesResources.resx @@ -138,9 +138,6 @@ Simplify all occurrences - - Remove Unnecessary Usings - <lambda expression> @@ -279,9 +276,6 @@ TODO: uncomment the following line if the finalizer is overridden above. - - Using directive is unnecessary. - try block {Locked="try"} "try" is a C# keyword and should not be localized. @@ -466,18 +460,6 @@ Properties - - Use explicit type instead of 'var' - - - Use explicit type - - - use 'var' instead of explicit type - - - Use implicit type - Autoselect disabled due to namespace declaration. @@ -613,12 +595,6 @@ Make 'ref struct' {Locked="ref"}{Locked="struct"} "ref" and "struct" are C# keywords and should not be localized. - - Convert switch statement to expression - - - Use 'switch' expression - Misplaced using directive {Locked="using"} "using" is a C# keyword and should not be localized. diff --git a/src/Features/CSharp/Portable/CodeFixes/Suppression/CSharpSuppressionCodeFixProvider.cs b/src/Features/CSharp/Portable/CodeFixes/Suppression/CSharpSuppressionCodeFixProvider.cs index 9b6fdde883f22..68e330644833a 100644 --- a/src/Features/CSharp/Portable/CodeFixes/Suppression/CSharpSuppressionCodeFixProvider.cs +++ b/src/Features/CSharp/Portable/CodeFixes/Suppression/CSharpSuppressionCodeFixProvider.cs @@ -13,6 +13,7 @@ using Microsoft.CodeAnalysis.CSharp.CodeGeneration; using Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.CodeAnalysis.Editing; using Microsoft.CodeAnalysis.Formatting; using Microsoft.CodeAnalysis.Simplification; using Microsoft.CodeAnalysis.Text; @@ -97,6 +98,7 @@ protected override SyntaxNode AddGlobalSuppressMessageAttribute( Workspace workspace, Compilation compilation, IAddImportsService addImportsService, + SyntaxGenerator generator, CancellationToken cancellationToken) { var compilationRoot = (CompilationUnitSyntax)newRoot; diff --git a/src/Features/CSharp/Portable/CodeRefactorings/UseExplicitOrImplicitType/UseExplicitTypeCodeRefactoringProvider.cs b/src/Features/CSharp/Portable/CodeRefactorings/UseExplicitOrImplicitType/UseExplicitTypeCodeRefactoringProvider.cs index 18a1c84012bbd..3d1059db0b19b 100644 --- a/src/Features/CSharp/Portable/CodeRefactorings/UseExplicitOrImplicitType/UseExplicitTypeCodeRefactoringProvider.cs +++ b/src/Features/CSharp/Portable/CodeRefactorings/UseExplicitOrImplicitType/UseExplicitTypeCodeRefactoringProvider.cs @@ -24,7 +24,7 @@ public UseExplicitTypeCodeRefactoringProvider() } protected override string Title - => CSharpFeaturesResources.Use_explicit_type; + => CSharpAnalyzersResources.Use_explicit_type; protected override TypeSyntax FindAnalyzableType(SyntaxNode node, SemanticModel semanticModel, CancellationToken cancellationToken) => CSharpUseExplicitTypeHelper.Instance.FindAnalyzableType(node, semanticModel, cancellationToken); diff --git a/src/Features/CSharp/Portable/CodeRefactorings/UseExplicitOrImplicitType/UseImplicitTypeCodeRefactoringProvider.cs b/src/Features/CSharp/Portable/CodeRefactorings/UseExplicitOrImplicitType/UseImplicitTypeCodeRefactoringProvider.cs index 2d802360bfe02..f38f6458e01ab 100644 --- a/src/Features/CSharp/Portable/CodeRefactorings/UseExplicitOrImplicitType/UseImplicitTypeCodeRefactoringProvider.cs +++ b/src/Features/CSharp/Portable/CodeRefactorings/UseExplicitOrImplicitType/UseImplicitTypeCodeRefactoringProvider.cs @@ -24,7 +24,7 @@ public UseImplicitTypeCodeRefactoringProvider() } protected override string Title - => CSharpFeaturesResources.Use_implicit_type; + => CSharpAnalyzersResources.Use_implicit_type; protected override TypeSyntax FindAnalyzableType(SyntaxNode node, SemanticModel semanticModel, CancellationToken cancellationToken) => CSharpUseImplicitTypeHelper.Instance.FindAnalyzableType(node, semanticModel, cancellationToken); diff --git a/src/Features/CSharp/Portable/Microsoft.CodeAnalysis.CSharp.Features.csproj b/src/Features/CSharp/Portable/Microsoft.CodeAnalysis.CSharp.Features.csproj index f34a6e41dc567..5ac8ef18d009a 100644 --- a/src/Features/CSharp/Portable/Microsoft.CodeAnalysis.CSharp.Features.csproj +++ b/src/Features/CSharp/Portable/Microsoft.CodeAnalysis.CSharp.Features.csproj @@ -43,6 +43,7 @@ + diff --git a/src/Features/CSharp/Portable/UseExplicitTypeForConst/UseExplicitTypeForConstCodeFixProvider.cs b/src/Features/CSharp/Portable/UseExplicitTypeForConst/UseExplicitTypeForConstCodeFixProvider.cs index 395b945108028..49ac97bdbc9ff 100644 --- a/src/Features/CSharp/Portable/UseExplicitTypeForConst/UseExplicitTypeForConstCodeFixProvider.cs +++ b/src/Features/CSharp/Portable/UseExplicitTypeForConst/UseExplicitTypeForConstCodeFixProvider.cs @@ -67,7 +67,7 @@ private static async Task FixAsync( private sealed class MyCodeAction : CodeAction.DocumentChangeAction { public MyCodeAction(Func> createChangedDocument) - : base(CSharpFeaturesResources.Use_explicit_type_instead_of_var, + : base(CSharpAnalyzersResources.Use_explicit_type_instead_of_var, createChangedDocument) { } diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.cs.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.cs.xlf index 2c4b780198b3b..1f54020787319 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.cs.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.cs.xlf @@ -72,11 +72,6 @@ Přiřadit parametry out (při spuštění) {Locked="out"} "out" is a C# keyword and should not be localized. - - Convert switch statement to expression - Převést příkaz switch na výraz - - Convert to method Převést na metodu @@ -152,11 +147,6 @@ Zjednodušit všechny výskyty - - Remove Unnecessary Usings - Odebrat nepotřebné direktivy using - - Sort accessibility modifiers Seřadit modifikátory dostupnosti @@ -167,11 +157,6 @@ Rozpečetit třídu {0} - - Use 'switch' expression - Použít výraz switch - - Warning: Inlining temporary into conditional method call. Upozornění: dočasné vkládání do volání podmíněné metody. @@ -432,11 +417,6 @@ TODO: Zrušte komentář následujícího řádku, pokud se výše přepisuje finalizační metoda. - - Using directive is unnecessary. - Direktiva Using není potřebná. - - switch statement příkaz switch @@ -677,26 +657,6 @@ Vlastnosti - - Use explicit type instead of 'var' - Použít explicitní typ místo var - - - - Use explicit type - Použít explicitní typ - - - - use 'var' instead of explicit type - Použít var místo explicitního typu - - - - Use implicit type - Použít implicitní typ - - Autoselect disabled due to namespace declaration. Automatický výběr je zakázaný kvůli deklaraci oboru názvů. diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.de.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.de.xlf index 8de0e269ca438..b3e1707332c38 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.de.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.de.xlf @@ -72,11 +72,6 @@ out-Parameter zuweisen (beim Start) {Locked="out"} "out" is a C# keyword and should not be localized. - - Convert switch statement to expression - Switch-Anweisung in Ausdruck konvertieren - - Convert to method In Methode konvertieren @@ -152,11 +147,6 @@ Alle Vorkommen vereinfachen - - Remove Unnecessary Usings - Nicht benötigte Using-Direktiven entfernen - - Sort accessibility modifiers Zugriffsmodifizierer sortieren @@ -167,11 +157,6 @@ Versiegelung der Klasse "{0}" aufheben - - Use 'switch' expression - Switch-Ausdruck verwenden - - Warning: Inlining temporary into conditional method call. Warnung: temporäres Inlining in bedingtem Methodenaufruf. @@ -432,11 +417,6 @@ TODO: Auskommentierung der folgenden Zeile aufheben, wenn der Finalizer weiter oben überschrieben wird. - - Using directive is unnecessary. - Using-Direktive ist unnötig. - - switch statement switch-Anweisung @@ -677,26 +657,6 @@ Eigenschaften - - Use explicit type instead of 'var' - Expliziten Typ anstelle von "var" verwenden - - - - Use explicit type - Expliziten Typ verwenden - - - - use 'var' instead of explicit type - "var" anstelle des expliziten Typs verwenden - - - - Use implicit type - Impliziten Typ verwenden - - Autoselect disabled due to namespace declaration. Die automatische Auswahl ist aufgrund der Namespacedeklaration deaktiviert. diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.es.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.es.xlf index 184fc09570595..fd17bea704b12 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.es.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.es.xlf @@ -72,11 +72,6 @@ Asignar parámetros "out" (al inicio) {Locked="out"} "out" is a C# keyword and should not be localized. - - Convert switch statement to expression - Convertir una instrucción switch en expresión - - Convert to method Convertir al método @@ -152,11 +147,6 @@ Simplificar todas las repeticiones - - Remove Unnecessary Usings - Eliminar instrucciones Using innecesarias - - Sort accessibility modifiers Ordenar modificadores de accesibilidad @@ -167,11 +157,6 @@ Quitar el sello de la clase "{0}" - - Use 'switch' expression - Usar la expresión "switch" - - Warning: Inlining temporary into conditional method call. Advertencia: Inserción de una llamada temporal en otra de método condicional. @@ -432,11 +417,6 @@ TODO: quite la marca de comentario de la siguiente línea si el finalizador se ha reemplazado antes. - - Using directive is unnecessary. - El uso de la directiva no es necesario. - - switch statement instrucción switch @@ -677,26 +657,6 @@ Propiedades - - Use explicit type instead of 'var' - Usar un tipo explícito en lugar de 'var' - - - - Use explicit type - Usar un tipo explícito - - - - use 'var' instead of explicit type - Usar 'var' en lugar de un tipo explícito - - - - Use implicit type - Usar un tipo implícito - - Autoselect disabled due to namespace declaration. Se ha deshabilitado la selección automática durante la declaración del espacio de nombres. diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.fr.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.fr.xlf index 35d37e2a05e0e..68c90454345ef 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.fr.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.fr.xlf @@ -72,11 +72,6 @@ Assigner des paramètres 'out' (au début) {Locked="out"} "out" is a C# keyword and should not be localized. - - Convert switch statement to expression - Convertir l'instruction switch en expression - - Convert to method Convertir en méthode @@ -152,11 +147,6 @@ Simplifier toutes les occurrences - - Remove Unnecessary Usings - Supprimer les Usings inutiles - - Sort accessibility modifiers Trier les modificateurs d'accessibilité @@ -167,11 +157,6 @@ Classe unsealed '{0}' - - Use 'switch' expression - Utiliser l'expression 'switch' - - Warning: Inlining temporary into conditional method call. Avertissement : Inlining temporaire dans un appel de méthode conditionnel. @@ -432,11 +417,6 @@ TODO: supprimer les marques de commentaire pour la ligne suivante si le finaliseur est remplacé ci-dessus. - - Using directive is unnecessary. - La directive using n'est pas nécessaire. - - switch statement instruction switch @@ -677,26 +657,6 @@ Propriétés - - Use explicit type instead of 'var' - Utiliser un type explicite au lieu de 'var' - - - - Use explicit type - Utiliser un type explicite - - - - use 'var' instead of explicit type - utiliser 'var' au lieu d'un type explicite - - - - Use implicit type - Utiliser un type implicite - - Autoselect disabled due to namespace declaration. Sélection automatique désactivée en raison d'une déclaration d'espace de noms. diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.it.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.it.xlf index 4eebac0efbcef..74a33080553fe 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.it.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.it.xlf @@ -72,11 +72,6 @@ Assegnare parametri 'out' (all'inizio) {Locked="out"} "out" is a C# keyword and should not be localized. - - Convert switch statement to expression - Converti l'istruzione switch in espressione - - Convert to method Converti in metodo @@ -152,11 +147,6 @@ Semplifica tutte le occorrenze - - Remove Unnecessary Usings - Rimuovi istruzioni using non necessarie - - Sort accessibility modifiers Ordina i modificatori di accessibilità @@ -167,11 +157,6 @@ Rimuovi seal dalla classe '{0}' - - Use 'switch' expression - Usa l'espressione 'switch' - - Warning: Inlining temporary into conditional method call. Avviso: incorporamento dell'elemento temporaneo nella chiamata a un metodo condizionale. @@ -432,11 +417,6 @@ TODO: rimuovere il commento dalla riga seguente se è stato eseguito l'override del finalizzatore. - - Using directive is unnecessary. - La direttiva using non è necessaria. - - switch statement istruzione switch @@ -677,26 +657,6 @@ Proprietà - - Use explicit type instead of 'var' - Usa il tipo esplicito invece di 'var' - - - - Use explicit type - Usa il tipo esplicito - - - - use 'var' instead of explicit type - usa 'var' invece del tipo esplicito - - - - Use implicit type - Usa il tipo implicito - - Autoselect disabled due to namespace declaration. La selezione automatica è disabilitata a causa della dichiarazione dello spazio dei nomi. diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ja.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ja.xlf index b87d0c0f0a002..73a7fcc7581bc 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ja.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ja.xlf @@ -72,11 +72,6 @@ 'out' パラメーターの割り当て (開始時) {Locked="out"} "out" is a C# keyword and should not be localized. - - Convert switch statement to expression - switch ステートメントを式に変換します - - Convert to method メソッドに変換 @@ -152,11 +147,6 @@ すべての出現箇所を簡素化します - - Remove Unnecessary Usings - 不要な using の削除 - - Sort accessibility modifiers アクセシビリティ修飾子を並べ替える @@ -167,11 +157,6 @@ クラス '{0}' のシールを解除 - - Use 'switch' expression - 'switch' 式を使用します - - Warning: Inlining temporary into conditional method call. 警告: 一時メソッド呼び出しを条件付きメソッド呼び出しにインライン展開しています。 @@ -432,11 +417,6 @@ TODO: 上のファイナライザーがオーバーライドされる場合は、次の行のコメントを解除してください。 - - Using directive is unnecessary. - Using ディレクティブは必要ありません。 - - switch statement switch ステートメント @@ -677,26 +657,6 @@ プロパティ - - Use explicit type instead of 'var' - var' ではなく明示的な型を使用します - - - - Use explicit type - 明示的な型の使用 - - - - use 'var' instead of explicit type - 明示的な型ではなく 'var' を使用します - - - - Use implicit type - 暗黙的な型の使用 - - Autoselect disabled due to namespace declaration. 名前空間宣言により、Autoselect は無効です。 diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ko.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ko.xlf index f2786fb05eacd..1feebc3bcf9c1 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ko.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ko.xlf @@ -72,11 +72,6 @@ 'out' 매개 변수 할당(시작 시) {Locked="out"} "out" is a C# keyword and should not be localized. - - Convert switch statement to expression - switch 문을 식으로 변환 - - Convert to method 메서드로 변환 @@ -152,11 +147,6 @@ 모든 항목 단순화 - - Remove Unnecessary Usings - 불필요한 Using 제거 - - Sort accessibility modifiers 접근성 한정자 정렬 @@ -167,11 +157,6 @@ '{0}' 클래스 봉인 해제 - - Use 'switch' expression - 'switch' 식 사용 - - Warning: Inlining temporary into conditional method call. 경고: 임시 작업을 조건부 메서드 호출로 인라인 처리합니다. @@ -432,11 +417,6 @@ TODO: 위의 종료자가 재정의된 경우 다음 코드 줄의 주석 처리를 제거합니다. - - Using directive is unnecessary. - Using 지시문은 필요하지 않습니다. - - switch statement switch 문 @@ -677,26 +657,6 @@ 속성 - - Use explicit type instead of 'var' - var' 대신에 명시적 형식을 사용합니다. - - - - Use explicit type - 명시적 형식 사용 - - - - use 'var' instead of explicit type - 대신 명시적 형식의 'var'을 사용합니다. - - - - Use implicit type - 암시적 형식 사용 - - Autoselect disabled due to namespace declaration. 네임스페이스 선언으로 인해 자동 선택을 사용할 수 없습니다. diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.pl.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.pl.xlf index a8600ac7a6021..667594f592367 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.pl.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.pl.xlf @@ -72,11 +72,6 @@ Przypisz parametry „out” (na początku) {Locked="out"} "out" is a C# keyword and should not be localized. - - Convert switch statement to expression - Konwertuj instrukcję switch na wyrażenie - - Convert to method Konwertuj na metodę @@ -152,11 +147,6 @@ Uprość wszystkie wystąpienia - - Remove Unnecessary Usings - Usuń niepotrzebne użycia - - Sort accessibility modifiers Sortuj modyfikatory dostępności @@ -167,11 +157,6 @@ Odpieczętuj klasę „{0}” - - Use 'switch' expression - Użyj wyrażenia „switch” - - Warning: Inlining temporary into conditional method call. Ostrzeżenie: tymczasowe wbudowywanie do wywołania metody warunkowej. @@ -432,11 +417,6 @@ TODO: Usunąć komentarz z poniższego wiersza, jeśli finalizator został przesłonięty powyżej. - - Using directive is unnecessary. - Dyrektywa using jest niepotrzebna. - - switch statement instrukcja switch @@ -677,26 +657,6 @@ Właściwości - - Use explicit type instead of 'var' - Użyj jawnego typu zamiast deklaracji „var” - - - - Use explicit type - Użyj jawnego typu - - - - use 'var' instead of explicit type - użyj deklaracji „var” zamiast jawnego typu - - - - Use implicit type - Użyj niejawnego typu - - Autoselect disabled due to namespace declaration. Automatyczne zaznaczanie zostało wyłączone z powodu deklaracji przestrzeni nazw. diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.pt-BR.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.pt-BR.xlf index 1dd4fdd0681f3..00cb6453b9269 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.pt-BR.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.pt-BR.xlf @@ -72,11 +72,6 @@ Atribuir parâmetros 'out' (no início) {Locked="out"} "out" is a C# keyword and should not be localized. - - Convert switch statement to expression - Converter a instrução switch em expressão - - Convert to method Converter em método @@ -152,11 +147,6 @@ Simplificar todas as ocorrências - - Remove Unnecessary Usings - Remover Usos Desnecessários - - Sort accessibility modifiers Classificar modificadores de acessibilidade @@ -167,11 +157,6 @@ Desselar a classe '{0}' - - Use 'switch' expression - Usar a expressão 'switch' - - Warning: Inlining temporary into conditional method call. Aviso: embutindo a chamada de método temporária na condicional. @@ -432,11 +417,6 @@ TODO: remover marca de comentário da linha a seguir se o finalizador for substituído acima. - - Using directive is unnecessary. - O uso da diretiva é desnecessário. - - switch statement instrução switch @@ -677,26 +657,6 @@ Propriedades - - Use explicit type instead of 'var' - Usar o tipo explícito em vez de 'var' - - - - Use explicit type - Usar o tipo explícito - - - - use 'var' instead of explicit type - usar 'var' em vez do tipo explícito - - - - Use implicit type - Usar o tipo implícito - - Autoselect disabled due to namespace declaration. Seleção automática desabilitada devido à declaração de namespace. diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ru.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ru.xlf index d1ef86ae9dd04..06f89a7ce6536 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ru.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ru.xlf @@ -72,11 +72,6 @@ Присвоение значений параметров "out" (при запуске) {Locked="out"} "out" is a C# keyword and should not be localized. - - Convert switch statement to expression - Преобразовать оператор switch в выражение - - Convert to method Преобразовать в метод @@ -152,11 +147,6 @@ Упростить все вхождения - - Remove Unnecessary Usings - Удалить ненужные директивы using - - Sort accessibility modifiers Сортировать модификаторы доступности @@ -167,11 +157,6 @@ Распечатать класс "{0}" - - Use 'switch' expression - Использовать выражение switch - - Warning: Inlining temporary into conditional method call. Предупреждение: встраивание временных элементов в условный вызов метода. @@ -432,11 +417,6 @@ TODO: раскомментировать следующую строку, если метод завершения переопределен выше. - - Using directive is unnecessary. - Директива using не нужна. - - switch statement оператор switch @@ -677,26 +657,6 @@ Свойства - - Use explicit type instead of 'var' - Использовать явный тип вместо var - - - - Use explicit type - Использование явного типа - - - - use 'var' instead of explicit type - Использовать var вместо явного типа - - - - Use implicit type - Использование неявного типа - - Autoselect disabled due to namespace declaration. Автовыбор отключен из-за объявления пространства имен. diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.tr.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.tr.xlf index 4ef34a3ce8af4..52e8f23df9e31 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.tr.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.tr.xlf @@ -72,11 +72,6 @@ 'out' parametreleri ata (başlangıçta) {Locked="out"} "out" is a C# keyword and should not be localized. - - Convert switch statement to expression - Switch deyimini ifadeye dönüştür - - Convert to method Yönteme dönüştür @@ -152,11 +147,6 @@ Tüm yinelemeleri basitleştir - - Remove Unnecessary Usings - Gereksiz Kullanımları Kaldır - - Sort accessibility modifiers Erişilebilirlik değiştiricilerini sırala @@ -167,11 +157,6 @@ '{0}' sınıfının mührünü aç - - Use 'switch' expression - 'Switch' ifadesini kullan - - Warning: Inlining temporary into conditional method call. Uyarı: Koşullu yöntem çağrısında geçici öğe satır içinde kullanılıyor. @@ -432,11 +417,6 @@ TODO: sonlandırıcı yukarıda geçersiz kılınırsa aşağıdaki satırın açıklamasını kaldırın. - - Using directive is unnecessary. - Using yönergesi gerekli değildir. - - switch statement switch deyimi @@ -677,26 +657,6 @@ Özellikler - - Use explicit type instead of 'var' - Var' yerine açık tür kullan - - - - Use explicit type - Açık tür kullanma - - - - use 'var' instead of explicit type - açık tür yerine 'var' kullan - - - - Use implicit type - Örtük tür kullanma - - Autoselect disabled due to namespace declaration. Ad alanı bildirimi nedeniyle otomatik seçme devre dışı bırakıldı. diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.zh-Hans.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.zh-Hans.xlf index b3e4fdea70675..d765263d14d13 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.zh-Hans.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.zh-Hans.xlf @@ -72,11 +72,6 @@ 分配 "out" (在开始处) {Locked="out"} "out" is a C# keyword and should not be localized. - - Convert switch statement to expression - 将 switch 语句转换为表达式 - - Convert to method 转换为方法 @@ -152,11 +147,6 @@ 简化所有事件 - - Remove Unnecessary Usings - 删除不必要的 Using - - Sort accessibility modifiers 对可访问性修饰符排序 @@ -167,11 +157,6 @@ Unseal 类 "{0}" - - Use 'switch' expression - 使用 "switch" 表达式 - - Warning: Inlining temporary into conditional method call. 警告: 即将在条件方法调用中内联临时内容。 @@ -432,11 +417,6 @@ TODO: 如果在以上内容中替代了终结器,则取消注释以下行。 - - Using directive is unnecessary. - Using 指令是不需要的。 - - switch statement switch 语句 @@ -677,26 +657,6 @@ 属性 - - Use explicit type instead of 'var' - 用显式类型代替 "var" - - - - Use explicit type - 使用显式类型 - - - - use 'var' instead of explicit type - 用 "var" 代替显式类型 - - - - Use implicit type - 使用隐式类型 - - Autoselect disabled due to namespace declaration. 自动选择由于命名空间声明而被禁用。 diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.zh-Hant.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.zh-Hant.xlf index 92f07214fa73e..2f89d97cf058c 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.zh-Hant.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.zh-Hant.xlf @@ -72,11 +72,6 @@ 指派 'out' 參數 (開始時) {Locked="out"} "out" is a C# keyword and should not be localized. - - Convert switch statement to expression - 將 switch 陳述式轉換為運算式 - - Convert to method 轉換為方法 @@ -152,11 +147,6 @@ 簡化所有項目 - - Remove Unnecessary Usings - 移除不必要的 Using - - Sort accessibility modifiers 排序協助工具修飾元 @@ -167,11 +157,6 @@ 為類別 '{0}' 解密 - - Use 'switch' expression - 使用 'switch' 運算式 - - Warning: Inlining temporary into conditional method call. 警告: 內嵌臨時加入條件式方法呼叫。 @@ -432,11 +417,6 @@ TODO: 如果上方的完成項已被覆寫,即取消下行的註解狀態。 - - Using directive is unnecessary. - 無須使用指示詞。 - - switch statement switch 陳述式 @@ -677,26 +657,6 @@ 屬性 - - Use explicit type instead of 'var' - 使用明確類型,而非 'var' - - - - Use explicit type - 使用明確類型 - - - - use 'var' instead of explicit type - 使用 'var',而非明確類型 - - - - Use implicit type - 使用隱含類型 - - Autoselect disabled due to namespace declaration. 由於命名空間宣告,所以停用自動選取。 diff --git a/src/Features/Core/Portable/CodeFixes/Suppression/AbstractSuppressionCodeFixProvider.GlobalSuppressMessageCodeAction.cs b/src/Features/Core/Portable/CodeFixes/Suppression/AbstractSuppressionCodeFixProvider.GlobalSuppressMessageCodeAction.cs index dd2ceb561ebff..bdd37b11ee275 100644 --- a/src/Features/Core/Portable/CodeFixes/Suppression/AbstractSuppressionCodeFixProvider.GlobalSuppressMessageCodeAction.cs +++ b/src/Features/Core/Portable/CodeFixes/Suppression/AbstractSuppressionCodeFixProvider.GlobalSuppressMessageCodeAction.cs @@ -5,6 +5,7 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis.AddImports; +using Microsoft.CodeAnalysis.Editing; using Microsoft.CodeAnalysis.Shared.Extensions; namespace Microsoft.CodeAnalysis.CodeFixes.Suppression @@ -35,9 +36,9 @@ protected override async Task GetChangedSuppressionDocumentAsync(Cance var suppressionsRoot = await suppressionsDoc.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); var compilation = await suppressionsDoc.Project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); var addImportsService = suppressionsDoc.GetRequiredLanguageService(); - + var generator = suppressionsDoc.GetRequiredLanguageService(); suppressionsRoot = Fixer.AddGlobalSuppressMessageAttribute( - suppressionsRoot, _targetSymbol, _suppressMessageAttribute, _diagnostic, workspace, compilation, addImportsService, cancellationToken); + suppressionsRoot, _targetSymbol, _suppressMessageAttribute, _diagnostic, workspace, compilation, addImportsService, generator, cancellationToken); return suppressionsDoc.WithSyntaxRoot(suppressionsRoot); } diff --git a/src/Features/Core/Portable/CodeFixes/Suppression/AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs b/src/Features/Core/Portable/CodeFixes/Suppression/AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs index af9f3c024751d..8c0be721adc3c 100644 --- a/src/Features/Core/Portable/CodeFixes/Suppression/AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs +++ b/src/Features/Core/Portable/CodeFixes/Suppression/AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs @@ -11,6 +11,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.AddImports; using Microsoft.CodeAnalysis.CodeActions; +using Microsoft.CodeAnalysis.Editing; using Microsoft.CodeAnalysis.PooledObjects; using Microsoft.CodeAnalysis.Shared.Extensions; using Roslyn.Utilities; @@ -123,7 +124,7 @@ protected override async Task GetChangedSuppressionDocumentAsync(Cance var suppressionsRoot = await suppressionsDoc.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); var compilation = await suppressionsDoc.Project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); var addImportsService = suppressionsDoc.GetRequiredLanguageService(); - + var generator = suppressionsDoc.GetRequiredLanguageService(); foreach (var kvp in _diagnosticsBySymbol) { var targetSymbol = kvp.Key; @@ -134,7 +135,7 @@ protected override async Task GetChangedSuppressionDocumentAsync(Cance Contract.ThrowIfFalse(!diagnostic.IsSuppressed); suppressionsRoot = Fixer.AddGlobalSuppressMessageAttribute( suppressionsRoot, targetSymbol, _suppressMessageAttribute, diagnostic, - workspace, compilation, addImportsService, cancellationToken); + workspace, compilation, addImportsService, generator, cancellationToken); } } diff --git a/src/Features/Core/Portable/CodeFixes/Suppression/AbstractSuppressionCodeFixProvider.cs b/src/Features/Core/Portable/CodeFixes/Suppression/AbstractSuppressionCodeFixProvider.cs index c4073ce67f87f..23a656727224c 100644 --- a/src/Features/Core/Portable/CodeFixes/Suppression/AbstractSuppressionCodeFixProvider.cs +++ b/src/Features/Core/Portable/CodeFixes/Suppression/AbstractSuppressionCodeFixProvider.cs @@ -10,6 +10,7 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis.AddImports; using Microsoft.CodeAnalysis.Diagnostics; +using Microsoft.CodeAnalysis.Editing; using Microsoft.CodeAnalysis.Formatting; using Microsoft.CodeAnalysis.LanguageServices; using Microsoft.CodeAnalysis.PooledObjects; @@ -55,6 +56,7 @@ protected abstract SyntaxNode AddGlobalSuppressMessageAttribute( Workspace workspace, Compilation compilation, IAddImportsService addImportsService, + SyntaxGenerator generator, CancellationToken cancellationToken); protected abstract SyntaxNode AddLocalSuppressMessageAttribute( diff --git a/src/Features/Core/Portable/FeaturesResources.Designer.cs b/src/Features/Core/Portable/FeaturesResources.Designer.cs index 4e4f24ee065c7..e31578a974b59 100644 --- a/src/Features/Core/Portable/FeaturesResources.Designer.cs +++ b/src/Features/Core/Portable/FeaturesResources.Designer.cs @@ -2588,15 +2588,6 @@ internal static string Make_method_synchronous { } } - /// - /// Looks up a localized string similar to Make readonly fields writable. - /// - internal static string Make_readonly_fields_writable { - get { - return ResourceManager.GetString("Make_readonly_fields_writable", resourceCulture); - } - } - /// /// Looks up a localized string similar to Member name can be simplified. /// @@ -3435,15 +3426,6 @@ internal static string Remove_unread_private_members { } } - /// - /// Looks up a localized string similar to Remove unused member. - /// - internal static string Remove_unused_member { - get { - return ResourceManager.GetString("Remove_unused_member", resourceCulture); - } - } - /// /// Looks up a localized string similar to Remove unused parameter. /// diff --git a/src/Features/Core/Portable/FeaturesResources.resx b/src/Features/Core/Portable/FeaturesResources.resx index 02aea7add61d9..4ba4b2719fb7c 100644 --- a/src/Features/Core/Portable/FeaturesResources.resx +++ b/src/Features/Core/Portable/FeaturesResources.resx @@ -1388,9 +1388,6 @@ This version used in: {2} Adding a method with an explicit interface specifier will prevent the debug session from continuing. - - Remove unused member - Private member '{0}' is unused. @@ -1622,10 +1619,6 @@ This version used in: {2} 'using' statement can be simplified - - Make readonly fields writable - {Locked="readonly"} "readonly" is C# keyword and should not be localized. - Move contents to namespace... diff --git a/src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj b/src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj index 5667ac50fb903..c75b1fe56c5a6 100644 --- a/src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj +++ b/src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj @@ -78,6 +78,7 @@ + @@ -95,7 +96,6 @@ - diff --git a/src/Features/Core/Portable/xlf/FeaturesResources.cs.xlf b/src/Features/Core/Portable/xlf/FeaturesResources.cs.xlf index 65a7c3f0bda05..844ec594369a3 100644 --- a/src/Features/Core/Portable/xlf/FeaturesResources.cs.xlf +++ b/src/Features/Core/Portable/xlf/FeaturesResources.cs.xlf @@ -362,11 +362,6 @@ Nastavit jako statickou - - Make readonly fields writable - Umožnit zápis do polí jen pro čtení (readonly) - {Locked="readonly"} "readonly" is C# keyword and should not be localized. - Invert conditional Převrátit podmínku @@ -497,11 +492,6 @@ Odebrat nepřečtené soukromé členy - - Remove unused member - Odebrat nepoužitý člen - - Remove unused parameter Odebrat nepoužívaný parametr diff --git a/src/Features/Core/Portable/xlf/FeaturesResources.de.xlf b/src/Features/Core/Portable/xlf/FeaturesResources.de.xlf index 5ea0a6af4bea7..46108b69658ec 100644 --- a/src/Features/Core/Portable/xlf/FeaturesResources.de.xlf +++ b/src/Features/Core/Portable/xlf/FeaturesResources.de.xlf @@ -362,11 +362,6 @@ Als statisch festlegen - - Make readonly fields writable - readonly-Felder als schreibbar festlegen - {Locked="readonly"} "readonly" is C# keyword and should not be localized. - Invert conditional Bedingten Operator umkehren @@ -497,11 +492,6 @@ Ungelesene private Member entfernen - - Remove unused member - Nicht verwendete Member entfernen - - Remove unused parameter Nicht verwendete Parameter entfernen diff --git a/src/Features/Core/Portable/xlf/FeaturesResources.es.xlf b/src/Features/Core/Portable/xlf/FeaturesResources.es.xlf index 3fe0e62d3ee86..e8174688cacb2 100644 --- a/src/Features/Core/Portable/xlf/FeaturesResources.es.xlf +++ b/src/Features/Core/Portable/xlf/FeaturesResources.es.xlf @@ -362,11 +362,6 @@ Hacer estático - - Make readonly fields writable - Convertir en editables los campos readonly - {Locked="readonly"} "readonly" is C# keyword and should not be localized. - Invert conditional Invertir condicional @@ -497,11 +492,6 @@ Quitar miembros privados no leídos - - Remove unused member - Quitar miembros sin usar - - Remove unused parameter Quitar el parámetro no utilizado diff --git a/src/Features/Core/Portable/xlf/FeaturesResources.fr.xlf b/src/Features/Core/Portable/xlf/FeaturesResources.fr.xlf index 0ed8c9a36cfaa..4bfcf322ecff1 100644 --- a/src/Features/Core/Portable/xlf/FeaturesResources.fr.xlf +++ b/src/Features/Core/Portable/xlf/FeaturesResources.fr.xlf @@ -362,11 +362,6 @@ Rendre statique - - Make readonly fields writable - Rendre les champs readonly accessibles en écriture - {Locked="readonly"} "readonly" is C# keyword and should not be localized. - Invert conditional Inverser un élément conditionnel @@ -497,11 +492,6 @@ Supprimer les membres privés non lus - - Remove unused member - Supprimer les membres non utilisés - - Remove unused parameter Supprimer le paramètre inutilisé diff --git a/src/Features/Core/Portable/xlf/FeaturesResources.it.xlf b/src/Features/Core/Portable/xlf/FeaturesResources.it.xlf index 59604fa2a42f3..f8071f515cdd9 100644 --- a/src/Features/Core/Portable/xlf/FeaturesResources.it.xlf +++ b/src/Features/Core/Portable/xlf/FeaturesResources.it.xlf @@ -362,11 +362,6 @@ Imposta come statici - - Make readonly fields writable - Rendi scrivibili i campi readonly - {Locked="readonly"} "readonly" is C# keyword and should not be localized. - Invert conditional Inverti espressione condizionale @@ -497,11 +492,6 @@ Rimuovi i membri privati non letti - - Remove unused member - Rimuovi il membro inutilizzato - - Remove unused parameter Rimuovere il parametro inutilizzato diff --git a/src/Features/Core/Portable/xlf/FeaturesResources.ja.xlf b/src/Features/Core/Portable/xlf/FeaturesResources.ja.xlf index ff8d036230be3..0c4bffd6f6424 100644 --- a/src/Features/Core/Portable/xlf/FeaturesResources.ja.xlf +++ b/src/Features/Core/Portable/xlf/FeaturesResources.ja.xlf @@ -362,11 +362,6 @@ 静的にする - - Make readonly fields writable - readonly フィールドを書き込み可能にします - {Locked="readonly"} "readonly" is C# keyword and should not be localized. - Invert conditional 条件を反転します @@ -497,11 +492,6 @@ 読み取られていないプライベート メンバーを削除 - - Remove unused member - 未使用のメンバーを削除 - - Remove unused parameter 未使用のパラメーターを削除します diff --git a/src/Features/Core/Portable/xlf/FeaturesResources.ko.xlf b/src/Features/Core/Portable/xlf/FeaturesResources.ko.xlf index 026b0aef40405..72a5ea9a7698f 100644 --- a/src/Features/Core/Portable/xlf/FeaturesResources.ko.xlf +++ b/src/Features/Core/Portable/xlf/FeaturesResources.ko.xlf @@ -362,11 +362,6 @@ 정적으로 만들기 - - Make readonly fields writable - readonly 필드를 쓰기 가능으로 지정 - {Locked="readonly"} "readonly" is C# keyword and should not be localized. - Invert conditional 조건 반전 @@ -497,11 +492,6 @@ 읽지 않은 private 멤버 제거 - - Remove unused member - 사용되지 않은 멤버 제거 - - Remove unused parameter 사용하지 않는 매개 변수를 제거하세요. diff --git a/src/Features/Core/Portable/xlf/FeaturesResources.pl.xlf b/src/Features/Core/Portable/xlf/FeaturesResources.pl.xlf index 35f8531753f11..0ee0a6b40382f 100644 --- a/src/Features/Core/Portable/xlf/FeaturesResources.pl.xlf +++ b/src/Features/Core/Portable/xlf/FeaturesResources.pl.xlf @@ -362,11 +362,6 @@ Ustaw jako statyczne - - Make readonly fields writable - Ustaw możliwość zapisu dla pól z deklaracją readonly - {Locked="readonly"} "readonly" is C# keyword and should not be localized. - Invert conditional Odwróć warunkowe @@ -497,11 +492,6 @@ Usuń nieodczytywane składowe prywatne - - Remove unused member - Usuń nieużywaną składową - - Remove unused parameter Usuń nieużywany parametr diff --git a/src/Features/Core/Portable/xlf/FeaturesResources.pt-BR.xlf b/src/Features/Core/Portable/xlf/FeaturesResources.pt-BR.xlf index 1a29a17fb5f69..3063d9cf6ec6e 100644 --- a/src/Features/Core/Portable/xlf/FeaturesResources.pt-BR.xlf +++ b/src/Features/Core/Portable/xlf/FeaturesResources.pt-BR.xlf @@ -362,11 +362,6 @@ Tornar estático - - Make readonly fields writable - Alterar os campos readonly para graváveis - {Locked="readonly"} "readonly" is C# keyword and should not be localized. - Invert conditional Inverter condicional @@ -497,11 +492,6 @@ Remover membros particulares não lidos - - Remove unused member - Remover membro não utilizado - - Remove unused parameter Remover o parâmetro não utilizado diff --git a/src/Features/Core/Portable/xlf/FeaturesResources.ru.xlf b/src/Features/Core/Portable/xlf/FeaturesResources.ru.xlf index 79a4ea6ad38c3..a63960a7b79d9 100644 --- a/src/Features/Core/Portable/xlf/FeaturesResources.ru.xlf +++ b/src/Features/Core/Portable/xlf/FeaturesResources.ru.xlf @@ -362,11 +362,6 @@ Сделать статическим - - Make readonly fields writable - Сделать поля readonly доступными для записи - {Locked="readonly"} "readonly" is C# keyword and should not be localized. - Invert conditional Инвертировать условный оператор @@ -497,11 +492,6 @@ Удалить непрочитанные закрытые члены - - Remove unused member - Удалить неиспользуемый член - - Remove unused parameter Удалите неиспользуемый параметр diff --git a/src/Features/Core/Portable/xlf/FeaturesResources.tr.xlf b/src/Features/Core/Portable/xlf/FeaturesResources.tr.xlf index d9cae62a3498a..1e37cc10be9b0 100644 --- a/src/Features/Core/Portable/xlf/FeaturesResources.tr.xlf +++ b/src/Features/Core/Portable/xlf/FeaturesResources.tr.xlf @@ -362,11 +362,6 @@ Statik yap - - Make readonly fields writable - readonly alanları yazılabilir yap - {Locked="readonly"} "readonly" is C# keyword and should not be localized. - Invert conditional Koşullu öğeyi ters çevir @@ -497,11 +492,6 @@ Okunmamış özel üyeleri kaldır - - Remove unused member - Kullanılmayan üye kaldırma - - Remove unused parameter Kullanılmayan parametreyi kaldırma diff --git a/src/Features/Core/Portable/xlf/FeaturesResources.zh-Hans.xlf b/src/Features/Core/Portable/xlf/FeaturesResources.zh-Hans.xlf index 3c25405931f16..c150c0cf5f81c 100644 --- a/src/Features/Core/Portable/xlf/FeaturesResources.zh-Hans.xlf +++ b/src/Features/Core/Portable/xlf/FeaturesResources.zh-Hans.xlf @@ -362,11 +362,6 @@ 设为静态 - - Make readonly fields writable - 使 readonly 字段可写 - {Locked="readonly"} "readonly" is C# keyword and should not be localized. - Invert conditional 反转条件 @@ -497,11 +492,6 @@ 删除未读的私有成员 - - Remove unused member - 删除未使用的成员 - - Remove unused parameter 删除未使用的参数 diff --git a/src/Features/Core/Portable/xlf/FeaturesResources.zh-Hant.xlf b/src/Features/Core/Portable/xlf/FeaturesResources.zh-Hant.xlf index 9c4a041412e80..06aff5b43591a 100644 --- a/src/Features/Core/Portable/xlf/FeaturesResources.zh-Hant.xlf +++ b/src/Features/Core/Portable/xlf/FeaturesResources.zh-Hant.xlf @@ -362,11 +362,6 @@ 使其變成靜態 - - Make readonly fields writable - 將 readonly 欄位設為可寫入 - {Locked="readonly"} "readonly" is C# keyword and should not be localized. - Invert conditional 反轉條件 @@ -497,11 +492,6 @@ 刪除未讀取的私用成員 - - Remove unused member - 移除未使用的成員 - - Remove unused parameter 移除未使用的參數 diff --git a/src/Features/LanguageServer/ProtocolUnitTests/CodeActions/CodeActionsTests.cs b/src/Features/LanguageServer/ProtocolUnitTests/CodeActions/CodeActionsTests.cs index a77ecb7284b48..fb380bb92e6d4 100644 --- a/src/Features/LanguageServer/ProtocolUnitTests/CodeActions/CodeActionsTests.cs +++ b/src/Features/LanguageServer/ProtocolUnitTests/CodeActions/CodeActionsTests.cs @@ -27,11 +27,11 @@ void M() } }"; var (solution, locations) = CreateTestSolution(markup); - var expected = CreateCommand(CSharpFeaturesResources.Use_implicit_type, locations["caret"].Single()); + var expected = CreateCommand(CSharpAnalyzersResources.Use_implicit_type, locations["caret"].Single()); var clientCapabilities = CreateClientCapabilitiesWithExperimentalValue("supportsWorkspaceEdits", JToken.FromObject(false)); var results = await RunGetCodeActionsAsync(solution, locations["caret"].Single(), clientCapabilities); - var useImplicitTypeResult = results.Single(r => r.Title == CSharpFeaturesResources.Use_implicit_type); + var useImplicitTypeResult = results.Single(r => r.Title == CSharpAnalyzersResources.Use_implicit_type); AssertJsonEquals(expected, useImplicitTypeResult); } diff --git a/src/Features/VisualBasic/Portable/CodeFixes/Suppression/VisualBasicSuppressionCodeFixProvider.vb b/src/Features/VisualBasic/Portable/CodeFixes/Suppression/VisualBasicSuppressionCodeFixProvider.vb index c5ef04818a959..e9267703ad346 100644 --- a/src/Features/VisualBasic/Portable/CodeFixes/Suppression/VisualBasicSuppressionCodeFixProvider.vb +++ b/src/Features/VisualBasic/Portable/CodeFixes/Suppression/VisualBasicSuppressionCodeFixProvider.vb @@ -8,6 +8,7 @@ Imports System.Threading Imports Microsoft.CodeAnalysis.AddImports Imports Microsoft.CodeAnalysis.CodeFixes Imports Microsoft.CodeAnalysis.CodeFixes.Suppression +Imports Microsoft.CodeAnalysis.Editing Imports Microsoft.CodeAnalysis.Formatting Imports Microsoft.CodeAnalysis.Simplification Imports Microsoft.CodeAnalysis.Text @@ -137,6 +138,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.CodeFixes.Suppression workspace As Workspace, compilation As Compilation, addImportsService As IAddImportsService, + generator As SyntaxGenerator, cancellationToken As CancellationToken) As SyntaxNode Dim compilationRoot = DirectCast(newRoot, CompilationUnitSyntax) Dim isFirst = Not compilationRoot.Attributes.Any() diff --git a/src/Features/VisualBasic/Portable/Microsoft.CodeAnalysis.VisualBasic.Features.vbproj b/src/Features/VisualBasic/Portable/Microsoft.CodeAnalysis.VisualBasic.Features.vbproj index 446144358e19d..cccedd4c421ef 100644 --- a/src/Features/VisualBasic/Portable/Microsoft.CodeAnalysis.VisualBasic.Features.vbproj +++ b/src/Features/VisualBasic/Portable/Microsoft.CodeAnalysis.VisualBasic.Features.vbproj @@ -38,6 +38,7 @@ + diff --git a/src/Features/VisualBasic/Portable/VBFeaturesResources.resx b/src/Features/VisualBasic/Portable/VBFeaturesResources.resx index ebc1ffe031536..02b6ccc1e4026 100644 --- a/src/Features/VisualBasic/Portable/VBFeaturesResources.resx +++ b/src/Features/VisualBasic/Portable/VBFeaturesResources.resx @@ -153,9 +153,6 @@ Delete the '{0}' statement. - - Remove Unnecessary Imports - Type a name here to declare a new field. @@ -1012,9 +1009,6 @@ Sub(<parameterList>) <statement> TODO: uncomment the following line if Finalize() is overridden above. - - Imports statement is unnecessary. - Try block {Locked="Try"} "Try" is a VB keyword and should not be localized. diff --git a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.cs.xlf b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.cs.xlf index 0d3273f25546f..c5b7721070a3a 100644 --- a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.cs.xlf +++ b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.cs.xlf @@ -92,11 +92,6 @@ <Víc typů> - - Remove Unnecessary Imports - Odebrat nepotřebné importy - - Type a name here to declare a new field. Sem vložte název, kterým deklarujete novou položku. @@ -1537,11 +1532,6 @@ Sub(<seznam_parametrů>) <výraz> TODO: Zrušte komentář následujícího řádku, pokud se výše přepisuje metoda Finalize(). - - Imports statement is unnecessary. - Příkaz Imports není potřebný. - - Try block Blok Try diff --git a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.de.xlf b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.de.xlf index dfdac24f1df19..510d245a5f235 100644 --- a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.de.xlf +++ b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.de.xlf @@ -92,11 +92,6 @@ <Mehrere Typen> - - Remove Unnecessary Imports - Unnötige Import-Direktiven entfernen - - Type a name here to declare a new field. Geben Sie hier einen Namen ein, um ein neues Feld zu deklarieren. @@ -1537,11 +1532,6 @@ Sub(<Parameterliste>) <Ausdruck> TODO: Auskommentierung der folgenden Zeile aufheben, wenn Finalize() oben überschrieben wird. - - Imports statement is unnecessary. - Imports-Anweisung ist unnötig. - - Try block Try-Block diff --git a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.es.xlf b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.es.xlf index c9306403e79ff..fe8a1f17b2990 100644 --- a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.es.xlf +++ b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.es.xlf @@ -92,11 +92,6 @@ <Varios tipos> - - Remove Unnecessary Imports - Quitar instrucciones Import innecesarias - - Type a name here to declare a new field. Escriba aquí un nombre para declarar un nuevo campo. @@ -1537,11 +1532,6 @@ Sub(<listaDeParámetros>) <instrucción> TODO: quite la marca de comentario de la siguiente línea si Finalize() se ha reemplazado antes. - - Imports statement is unnecessary. - La declaración de importaciones no es necesaria. - - Try block Bloque Try diff --git a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.fr.xlf b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.fr.xlf index 318181f1cd2e5..c5ce2100a3041 100644 --- a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.fr.xlf +++ b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.fr.xlf @@ -92,11 +92,6 @@ <Plusieurs types> - - Remove Unnecessary Imports - Supprimer les importations superflues - - Type a name here to declare a new field. Tapez un nom ici pour déclarer un nouveau champ. @@ -1537,11 +1532,6 @@ Sub(<parameterList>) <statement> TODO: supprimer les marques de commentaire pour la ligne suivante si Finalize() est remplacé ci-dessus. - - Imports statement is unnecessary. - L'instruction Imports n'est pas utile. - - Try block Bloc Try diff --git a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.it.xlf b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.it.xlf index 040601d324035..be83e1bffdafd 100644 --- a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.it.xlf +++ b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.it.xlf @@ -92,11 +92,6 @@ <Più tipi> - - Remove Unnecessary Imports - Rimuovi Import non necessari - - Type a name here to declare a new field. Digitare qui un nome per dichiarare un nuovo campo. @@ -1537,11 +1532,6 @@ Sub(<elencoParametri>) <istruzione> TODO: rimuovere il commento dalla riga seguente se è stato eseguito l'override di Finalize(). - - Imports statement is unnecessary. - L'istruzione Imports non è necessaria. - - Try block blocco Try diff --git a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.ja.xlf b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.ja.xlf index f97023cf54191..0910e7d0119aa 100644 --- a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.ja.xlf +++ b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.ja.xlf @@ -92,11 +92,6 @@ <複数の種類> - - Remove Unnecessary Imports - 不要なインポートの削除 - - Type a name here to declare a new field. 新しいフィールドを宣言するには、ここに名前を入力します。 @@ -1537,11 +1532,6 @@ Sub(<parameterList>) <statement> TODO: 上の Finalize() がオーバーライドされている場合は、次の行のコメントを解除してください。 - - Imports statement is unnecessary. - Imports ステートメントは不要です。 - - Try block Try ブロック diff --git a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.ko.xlf b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.ko.xlf index f524bcbdd78a7..5da8aa9a7781a 100644 --- a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.ko.xlf +++ b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.ko.xlf @@ -92,11 +92,6 @@ <여러 형식> - - Remove Unnecessary Imports - 불필요한 Imports 제거 - - Type a name here to declare a new field. 여기에 이름을 입력하여 새 필드를 선언하세요. @@ -1537,11 +1532,6 @@ Sub(<parameterList>) <statement> TODO: 위의 Finalize()가 재정의된 경우 다음 줄의 주석 처리를 제거합니다. - - Imports statement is unnecessary. - Imports 문은 필요하지 않습니다. - - Try block Try 블록 diff --git a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.pl.xlf b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.pl.xlf index 9427095f507a8..5c439500b1290 100644 --- a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.pl.xlf +++ b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.pl.xlf @@ -92,11 +92,6 @@ <Wiele typów> - - Remove Unnecessary Imports - Usuń niepotrzebne importy - - Type a name here to declare a new field. Wpisz tutaj nazwę, aby utworzyć deklarację nowego pola. @@ -1537,11 +1532,6 @@ Sub(<listaParametrów>) <instrukcja> TODO: usuń komentarz z poniższego wiersza, jeśli powyższa metoda Finalize() została przesłonięta. - - Imports statement is unnecessary. - Instrukcja imports jest niepotrzebna. - - Try block Blok Try diff --git a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.pt-BR.xlf b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.pt-BR.xlf index 3f2074de04761..edf910539cce3 100644 --- a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.pt-BR.xlf +++ b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.pt-BR.xlf @@ -92,11 +92,6 @@ <Vários Tipos> - - Remove Unnecessary Imports - Remover Importações Desnecessárias - - Type a name here to declare a new field. Digite um nome aqui para declarar um novo campo. @@ -1537,11 +1532,6 @@ Sub(<parameterList>) <statement> TODO: remover marca de comentário da linha a seguir se Finalize() for substituído acima. - - Imports statement is unnecessary. - A instrução Imports é desnecessária. - - Try block Bloco Try diff --git a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.ru.xlf b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.ru.xlf index 1f85c8c78fa25..2ddb6090fa2d2 100644 --- a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.ru.xlf +++ b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.ru.xlf @@ -92,11 +92,6 @@ <Несколько типов> - - Remove Unnecessary Imports - Удалить ненужные импорты - - Type a name here to declare a new field. Введите здесь имя для объявления нового поля. @@ -1537,11 +1532,6 @@ Sub(<parameterList>) <statement> TODO: раскомментировать следующую строку, если Finalize() переопределен выше. - - Imports statement is unnecessary. - Оператор Imports не нужен. - - Try block Блок Try diff --git a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.tr.xlf b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.tr.xlf index 9d0ca347d7f9b..b66b5d9e82d55 100644 --- a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.tr.xlf +++ b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.tr.xlf @@ -92,11 +92,6 @@ <Multiple Types> - - Remove Unnecessary Imports - Gereksiz İçeri Aktarmaları Kaldır - - Type a name here to declare a new field. Yeni bir alan bildirmek için buraya bir ad yazın. @@ -1537,11 +1532,6 @@ Sub(<parameterList>) <statement> TODO: Finalize() yukarıda geçersiz kılınırsa aşağıdaki satırın açıklamasını kaldırın. - - Imports statement is unnecessary. - Imports deyimi gerekli değildir. - - Try block Try bloğu diff --git a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.zh-Hans.xlf b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.zh-Hans.xlf index 0dd85f6c2a024..8915c682b0d2e 100644 --- a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.zh-Hans.xlf +++ b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.zh-Hans.xlf @@ -92,11 +92,6 @@ <多种类型> - - Remove Unnecessary Imports - 删除不必要的导入 - - Type a name here to declare a new field. 请在此处键入名称以声明新字段。 @@ -1537,11 +1532,6 @@ Sub(<parameterList>) <statement> TODO: 如果在以上内容中替代了 Finalize(),则取消注释以下行。 - - Imports statement is unnecessary. - Imports 语句是不需要的。 - - Try block Try 块 diff --git a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.zh-Hant.xlf b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.zh-Hant.xlf index e4d1718dbc4bb..0841dafece934 100644 --- a/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.zh-Hant.xlf +++ b/src/Features/VisualBasic/Portable/xlf/VBFeaturesResources.zh-Hant.xlf @@ -92,11 +92,6 @@ <多項類型> - - Remove Unnecessary Imports - 移除不必要的匯入 - - Type a name here to declare a new field. 於此輸入名稱以宣告新的欄位。 @@ -1537,11 +1532,6 @@ Sub(<parameterList>) <statement> TODO: 覆寫上列 Finalize() 時,取消下行的註解狀態。 - - Imports statement is unnecessary. - 無須 Imports 陳述式。 - - Try block Try 區塊 diff --git a/src/Test/Utilities/Portable/Roslyn.Test.Utilities.csproj b/src/Test/Utilities/Portable/Roslyn.Test.Utilities.csproj index 9a20e8ddf591a..7aac547c0edc3 100644 --- a/src/Test/Utilities/Portable/Roslyn.Test.Utilities.csproj +++ b/src/Test/Utilities/Portable/Roslyn.Test.Utilities.csproj @@ -59,6 +59,12 @@ + + + + + + diff --git a/src/VisualStudio/LiveShare/Test/PreviewCodeActionsTests.cs b/src/VisualStudio/LiveShare/Test/PreviewCodeActionsTests.cs index 7a3c6c85ec217..6be210fe276f5 100644 --- a/src/VisualStudio/LiveShare/Test/PreviewCodeActionsTests.cs +++ b/src/VisualStudio/LiveShare/Test/PreviewCodeActionsTests.cs @@ -27,7 +27,7 @@ void M() var (solution, locations) = CreateTestSolution(markup); var expected = CreateTextEdit("var", locations["edit"].First().Range); - var results = await TestHandleAsync(solution, CreateRunCodeActionParams(CSharpFeaturesResources.Use_implicit_type, locations["caret"].First())); + var results = await TestHandleAsync(solution, CreateRunCodeActionParams(CSharpAnalyzersResources.Use_implicit_type, locations["caret"].First())); AssertJsonEquals(new LSP.TextEdit[] { expected }, results); } diff --git a/src/VisualStudio/LiveShare/Test/RunCodeActionsHandlerTests.cs b/src/VisualStudio/LiveShare/Test/RunCodeActionsHandlerTests.cs index d527faf48896f..45c35e1a76534 100644 --- a/src/VisualStudio/LiveShare/Test/RunCodeActionsHandlerTests.cs +++ b/src/VisualStudio/LiveShare/Test/RunCodeActionsHandlerTests.cs @@ -29,7 +29,7 @@ void M() var (solution, ranges) = CreateTestSolution(markup); var codeActionLocation = ranges["caret"].First(); - var results = await TestHandleAsync(solution, CreateExecuteCommandParams(codeActionLocation, CSharpFeaturesResources.Use_implicit_type)); + var results = await TestHandleAsync(solution, CreateExecuteCommandParams(codeActionLocation, CSharpAnalyzersResources.Use_implicit_type)); Assert.True((bool)results); } diff --git a/src/Workspaces/CSharp/Portable/CSharpWorkspaceResources.Designer.cs b/src/Workspaces/CSharp/Portable/CSharpWorkspaceResources.Designer.cs index 0849218f7b212..3f126f465690a 100644 --- a/src/Workspaces/CSharp/Portable/CSharpWorkspaceResources.Designer.cs +++ b/src/Workspaces/CSharp/Portable/CSharpWorkspaceResources.Designer.cs @@ -69,33 +69,6 @@ internal static string Cannot_retrieve_the_Span_of_a_null_syntax_reference { } } - /// - /// Looks up a localized string similar to Code-block preferences. - /// - internal static string Code_block_preferences { - get { - return ResourceManager.GetString("Code_block_preferences", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Expected string or char literal. - /// - internal static string Expected_string_or_char_literal { - get { - return ResourceManager.GetString("Expected_string_or_char_literal", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Expression-bodied members. - /// - internal static string Expression_bodied_members { - get { - return ResourceManager.GetString("Expression_bodied_members", resourceCulture); - } - } - /// /// Looks up a localized string similar to Implement Interface. /// @@ -150,15 +123,6 @@ internal static string Node_not_in_parent_s_child_list { } } - /// - /// Looks up a localized string similar to Null-checking preferences. - /// - internal static string Null_checking_preferences { - get { - return ResourceManager.GetString("Null_checking_preferences", resourceCulture); - } - } - /// /// Looks up a localized string similar to Only attributes, constructor initializers, expressions or statements can be made explicit. /// @@ -169,15 +133,6 @@ internal static string Only_attributes_constructor_initializers_expressions_or_s } } - /// - /// Looks up a localized string similar to Pattern matching preferences. - /// - internal static string Pattern_matching_preferences { - get { - return ResourceManager.GetString("Pattern_matching_preferences", resourceCulture); - } - } - /// /// Looks up a localized string similar to R&emove and Sort Usings. /// @@ -214,24 +169,6 @@ internal static string Trivia_is_not_associated_with_token { } } - /// - /// Looks up a localized string similar to 'using' directive preferences. - /// - internal static string using_directive_preferences { - get { - return ResourceManager.GetString("using_directive_preferences", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to var preferences. - /// - internal static string var_preferences { - get { - return ResourceManager.GetString("var_preferences", resourceCulture); - } - } - /// /// Looks up a localized string similar to Wrapping preferences. /// diff --git a/src/Workspaces/CSharp/Portable/CSharpWorkspaceResources.resx b/src/Workspaces/CSharp/Portable/CSharpWorkspaceResources.resx index 54e6d99229a41..a4643510f319d 100644 --- a/src/Workspaces/CSharp/Portable/CSharpWorkspaceResources.resx +++ b/src/Workspaces/CSharp/Portable/CSharpWorkspaceResources.resx @@ -123,9 +123,6 @@ Namespace can not be added in this destination. - - Expected string or char literal - Node does not descend from root. @@ -144,34 +141,15 @@ Implement Interface - - Code-block preferences - - - Expression-bodied members - Indentation preferences - - Null-checking preferences - - - Pattern matching preferences - Space preferences - - var preferences - Wrapping preferences - - 'using' directive preferences - {Locked="using"} "using" is a C# keyword and should not be localized. - R&emove and Sort Usings diff --git a/src/Workspaces/CSharp/Portable/Formatting/CSharpFormattingOptions.cs b/src/Workspaces/CSharp/Portable/Formatting/CSharpFormattingOptions.cs index 27615c20a3fa8..74c865acca872 100644 --- a/src/Workspaces/CSharp/Portable/Formatting/CSharpFormattingOptions.cs +++ b/src/Workspaces/CSharp/Portable/Formatting/CSharpFormattingOptions.cs @@ -4,12 +4,14 @@ using System.Collections.Immutable; using System.Diagnostics; -using Microsoft.CodeAnalysis.Options; using Roslyn.Utilities; #if CODE_STYLE using CSharpWorkspaceResources = Microsoft.CodeAnalysis.CSharp.CSharpCodeStyleResources; using WorkspacesResources = Microsoft.CodeAnalysis.CodeStyleResources; +using Microsoft.CodeAnalysis.Internal.Options; +#else +using Microsoft.CodeAnalysis.Options; #endif namespace Microsoft.CodeAnalysis.CSharp.Formatting diff --git a/src/Workspaces/CSharp/Portable/Formatting/Rules/SpacingFormattingRule.cs b/src/Workspaces/CSharp/Portable/Formatting/Rules/SpacingFormattingRule.cs index a253695849020..f9041017047ef 100644 --- a/src/Workspaces/CSharp/Portable/Formatting/Rules/SpacingFormattingRule.cs +++ b/src/Workspaces/CSharp/Portable/Formatting/Rules/SpacingFormattingRule.cs @@ -7,10 +7,12 @@ using Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Formatting.Rules; -using Microsoft.CodeAnalysis.Options; #if CODE_STYLE using OptionSet = Microsoft.CodeAnalysis.Diagnostics.AnalyzerConfigOptions; +using Microsoft.CodeAnalysis.Internal.Options; +#else +using Microsoft.CodeAnalysis.Options; #endif namespace Microsoft.CodeAnalysis.CSharp.Formatting diff --git a/src/Workspaces/CSharp/Portable/Microsoft.CodeAnalysis.CSharp.Workspaces.csproj b/src/Workspaces/CSharp/Portable/Microsoft.CodeAnalysis.CSharp.Workspaces.csproj index fdd92f406d2a2..ddee3ed455b27 100644 --- a/src/Workspaces/CSharp/Portable/Microsoft.CodeAnalysis.CSharp.Workspaces.csproj +++ b/src/Workspaces/CSharp/Portable/Microsoft.CodeAnalysis.CSharp.Workspaces.csproj @@ -41,6 +41,7 @@ + diff --git a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.cs.xlf b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.cs.xlf index 132b288b59eb3..6727a9f9e98fa 100644 --- a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.cs.xlf +++ b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.cs.xlf @@ -2,16 +2,6 @@ - - Code-block preferences - Předvolby bloků kódu - - - - Expression-bodied members - Členy s výrazem v těle - - Indentation preferences Předvolby odsazení @@ -27,11 +17,6 @@ Obor názvů nejde přidat do tohoto cílového umístění. - - Expected string or char literal - Očekával se řetězcový nebo znakový literál. - - Node does not descend from root. Uzel nesestupuje z kořene. @@ -42,16 +27,6 @@ Uzel není v seznamu podřízených položek u nadřazené položky. - - Null-checking preferences - Předvolby kontrol hodnoty null - - - - Pattern matching preferences - Předvolby porovnávání vzorů - - R&emove and Sort Usings Od&ebrat a seřadit direktivy Using @@ -92,16 +67,6 @@ Předvolby zalamování - - 'using' directive preferences - Předvolby direktivy using - {Locked="using"} "using" is a C# keyword and should not be localized. - - - var preferences - Předvolby pro var - - \ No newline at end of file diff --git a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.de.xlf b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.de.xlf index 59903b263e65c..aa15dc7b1e9ff 100644 --- a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.de.xlf +++ b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.de.xlf @@ -2,16 +2,6 @@ - - Code-block preferences - Einstellungen für Codeblöcke - - - - Expression-bodied members - Ausdruckskörpermember - - Indentation preferences Einstellungen für Einrückung @@ -27,11 +17,6 @@ Namespace kann zu diesem Ziel nicht hinzugefügt werden. - - Expected string or char literal - Erwartete Zeichenfolge oder Zeichenliteral - - Node does not descend from root. Knoten steigt nicht vom Stamm ab. @@ -42,16 +27,6 @@ Knoten befindet sich nicht in der untergeordneten Liste des übergeordneten Elements - - Null-checking preferences - Einstellungen für NULL-Überprüfung - - - - Pattern matching preferences - Einstellungen für den Musterabgleich - - R&emove and Sort Usings &Unnötige Using-Direktiven entfernen und sortieren @@ -92,16 +67,6 @@ Umbrucheinstellungen - - 'using' directive preferences - Einstellungen für using-Anweisungen - {Locked="using"} "using" is a C# keyword and should not be localized. - - - var preferences - Var-Einstellungen - - \ No newline at end of file diff --git a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.es.xlf b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.es.xlf index c7ae94379ecb4..2aa4dd86a4f2e 100644 --- a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.es.xlf +++ b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.es.xlf @@ -2,16 +2,6 @@ - - Code-block preferences - Preferencias de bloque de código - - - - Expression-bodied members - Miembros en cuerpo de expresión - - Indentation preferences Preferencias de indentación @@ -27,11 +17,6 @@ El espacio de nombres no se puede agregar en este destino. - - Expected string or char literal - Cadena o carácter literal esperados - - Node does not descend from root. El nodo no desciende de la raíz. @@ -42,16 +27,6 @@ El nodo no está en una lista secundaria de la primaria - - Null-checking preferences - Preferencias de comprobación de nulo - - - - Pattern matching preferences - Preferencias de coincidencia de patrón - - R&emove and Sort Usings Q&uitar y ordenar usos @@ -92,16 +67,6 @@ Preferencias de encapsulado - - 'using' directive preferences - Preferencias de directiva "using" - {Locked="using"} "using" is a C# keyword and should not be localized. - - - var preferences - Preferencias de var - - \ No newline at end of file diff --git a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.fr.xlf b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.fr.xlf index d36b84bb9c882..d81fff37a4442 100644 --- a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.fr.xlf +++ b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.fr.xlf @@ -2,16 +2,6 @@ - - Code-block preferences - Préférences de bloc de code - - - - Expression-bodied members - Membres expression-bodied - - Indentation preferences Préférences de mise en retrait @@ -27,11 +17,6 @@ L'espace de noms ne peut pas être ajouté dans cette destination. - - Expected string or char literal - Littéral char ou string attendu - - Node does not descend from root. Le nœud ne provient pas de la racine. @@ -42,16 +27,6 @@ Le nœud ne figure pas dans la liste des enfants du parent - - Null-checking preferences - Préférences de vérification de valeur Null - - - - Pattern matching preferences - Préférences correspondants au modèle - - R&emove and Sort Usings Supprim&er et trier les instructions using @@ -92,16 +67,6 @@ Préférences d'enveloppement - - 'using' directive preferences - Préférences pour la directive 'using' - {Locked="using"} "using" is a C# keyword and should not be localized. - - - var preferences - Préférences de var - - \ No newline at end of file diff --git a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.it.xlf b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.it.xlf index e9aa19bc79792..e680643c12376 100644 --- a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.it.xlf +++ b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.it.xlf @@ -2,16 +2,6 @@ - - Code-block preferences - Preferenze per blocchi di codice - - - - Expression-bodied members - Membri con corpo di espressione - - Indentation preferences Preferenze per rientro @@ -27,11 +17,6 @@ Non è possibile aggiungere lo spazio dei nomi in questa destinazione. - - Expected string or char literal - È previsto un valore letterale di tipo stringa o char - - Node does not descend from root. Il nodo non discende dalla radice. @@ -42,16 +27,6 @@ Il nodo non è incluso nell'elenco degli elementi figlio dell'elemento padre - - Null-checking preferences - Preference per controllo valori Null - - - - Pattern matching preferences - Preferenze per criteri di ricerca - - R&emove and Sort Usings Ri&muovi e ordina using @@ -92,16 +67,6 @@ Preferenze per ritorno a capo - - 'using' directive preferences - Preferenze per direttive 'using' - {Locked="using"} "using" is a C# keyword and should not be localized. - - - var preferences - Preferenze per var - - \ No newline at end of file diff --git a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.ja.xlf b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.ja.xlf index c7176159a842d..698d74492b5f6 100644 --- a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.ja.xlf +++ b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.ja.xlf @@ -2,16 +2,6 @@ - - Code-block preferences - コード ブロックの設定 - - - - Expression-bodied members - 式のようなメンバー - - Indentation preferences インデント設定 @@ -27,11 +17,6 @@ 名前空間は、このターゲットでは追加できません。 - - Expected string or char literal - 文字列または文字リテラルが必要です - - Node does not descend from root. ノードがルートから派生していません。 @@ -42,16 +27,6 @@ ノードが親の子リストにありません - - Null-checking preferences - Null チェック設定 - - - - Pattern matching preferences - パターン マッチング設定 - - R&emove and Sort Usings Using の削除と並び替え(&E) @@ -92,16 +67,6 @@ 折り返しの設定 - - 'using' directive preferences - 'using' ディレクティブの基本設定 - {Locked="using"} "using" is a C# keyword and should not be localized. - - - var preferences - var を優先 - - \ No newline at end of file diff --git a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.ko.xlf b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.ko.xlf index b526270bc1160..a624d957ff701 100644 --- a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.ko.xlf +++ b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.ko.xlf @@ -2,16 +2,6 @@ - - Code-block preferences - 코드 블록 기본 설정 - - - - Expression-bodied members - 식 본문 멤버 - - Indentation preferences 들여쓰기 기본 설정 @@ -27,11 +17,6 @@ 이 대상에는 네임스페이스를 추가할 수 없습니다. - - Expected string or char literal - 문자열 또는 문자 리터럴이 필요합니다. - - Node does not descend from root. 노드가 루트의 내림차순이 아닙니다. @@ -42,16 +27,6 @@ 부모의 자식 목록에 노드가 없습니다. - - Null-checking preferences - Null 검사 기본 설정 - - - - Pattern matching preferences - 패턴 일치 기본 설정 - - R&emove and Sort Usings Using 제거 및 정렬(&E) @@ -92,16 +67,6 @@ 기본 설정 래핑 - - 'using' directive preferences - 'using' 지시문 기본 설정 - {Locked="using"} "using" is a C# keyword and should not be localized. - - - var preferences - var 기본 설정 - - \ No newline at end of file diff --git a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.pl.xlf b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.pl.xlf index cc127ab53cf1d..f71b516b0979d 100644 --- a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.pl.xlf +++ b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.pl.xlf @@ -2,16 +2,6 @@ - - Code-block preferences - Preferencje bloku kodu - - - - Expression-bodied members - Składowe z wyrażeniem w treści - - Indentation preferences Preferencje wcięć @@ -27,11 +17,6 @@ Do tego miejsca docelowego nie można dodać przestrzeni nazw. - - Expected string or char literal - Oczekiwano ciągu lub literału znakowego - - Node does not descend from root. Węzeł nie jest elementem podrzędnym elementu głównego. @@ -42,16 +27,6 @@ Węzeł nie znajduje się na liście elementów podrzędnych elementu nadrzędnego - - Null-checking preferences - Preferencje sprawdzania wartości null - - - - Pattern matching preferences - Preferencje dopasowywania do wzorca - - R&emove and Sort Usings &Usuń i sortuj instrukcje using @@ -92,16 +67,6 @@ Preferencje zawijania - - 'using' directive preferences - Preferencje dyrektywy „using” - {Locked="using"} "using" is a C# keyword and should not be localized. - - - var preferences - Preferencje zmiennych - - \ No newline at end of file diff --git a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.pt-BR.xlf b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.pt-BR.xlf index 141bd9a09f486..bdbdcb506c524 100644 --- a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.pt-BR.xlf +++ b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.pt-BR.xlf @@ -2,16 +2,6 @@ - - Code-block preferences - Preferências do bloco de código - - - - Expression-bodied members - Membros aptos para expressão - - Indentation preferences Preferências de recuo @@ -27,11 +17,6 @@ Namespace não pode ser adicionado nesse destino. - - Expected string or char literal - Cadeia de caracteres esperada ou literal char - - Node does not descend from root. Nó não deriva da raiz. @@ -42,16 +27,6 @@ Nó não está na lista de filhos do pai - - Null-checking preferences - Preferências de verificação nula - - - - Pattern matching preferences - Preferências de correspondência de padrões - - R&emove and Sort Usings R&emover e Classificar Usos @@ -92,16 +67,6 @@ Preferências de quebra de linha - - 'using' directive preferences - Preferências da diretiva 'using' - {Locked="using"} "using" is a C# keyword and should not be localized. - - - var preferences - preferências de var - - \ No newline at end of file diff --git a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.ru.xlf b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.ru.xlf index e490b07a224ba..15d6ed6646df2 100644 --- a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.ru.xlf +++ b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.ru.xlf @@ -2,16 +2,6 @@ - - Code-block preferences - Предпочтения для блоков кода - - - - Expression-bodied members - Члены, заданные выражениями - - Indentation preferences Предпочтения для отступов @@ -27,11 +17,6 @@ Не удается добавить пространство имен в этот конечный объект. - - Expected string or char literal - Требуется строка или знаковый литерал - - Node does not descend from root. Узел не является корневым. @@ -42,16 +27,6 @@ Узел не входит в родительский список дочерних узлов - - Null-checking preferences - Настройки проверки на null - - - - Pattern matching preferences - Настройки соответствия шаблонов - - R&emove and Sort Usings У&далить и отсортировать директивы using @@ -92,16 +67,6 @@ Предпочтения переноса - - 'using' directive preferences - предпочтения для директивы using - {Locked="using"} "using" is a C# keyword and should not be localized. - - - var preferences - Предпочтения var - - \ No newline at end of file diff --git a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.tr.xlf b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.tr.xlf index f654029681ee3..b1c3ab31384ca 100644 --- a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.tr.xlf +++ b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.tr.xlf @@ -2,16 +2,6 @@ - - Code-block preferences - Kod bloğu tercihleri - - - - Expression-bodied members - İfade gövdeli Üyeler - - Indentation preferences Girinti tercihleri @@ -27,11 +17,6 @@ Ad alanı bu hedefe eklenemez. - - Expected string or char literal - Beklenen dize veya karakter sabiti değeri - - Node does not descend from root. Düğüm kökten azalmaz. @@ -42,16 +27,6 @@ Düğüm üst öğenin alt öğe listesinde değil - - Null-checking preferences - Null denetimi tercihleri - - - - Pattern matching preferences - Desen eşleştirme tercihleri - - R&emove and Sort Usings &Kaldır ve Sıralama Usings @@ -92,16 +67,6 @@ Kaydırma tercihleri - - 'using' directive preferences - 'using' yönergesi tercihleri - {Locked="using"} "using" is a C# keyword and should not be localized. - - - var preferences - var tercihleri - - \ No newline at end of file diff --git a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.zh-Hans.xlf b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.zh-Hans.xlf index 0573a886900be..f3aa0d431c08a 100644 --- a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.zh-Hans.xlf +++ b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.zh-Hans.xlf @@ -2,16 +2,6 @@ - - Code-block preferences - 代码块首选项 - - - - Expression-bodied members - Expression-bodied 成员 - - Indentation preferences 缩进首选项 @@ -27,11 +17,6 @@ 不能在此目标中添加命名空间。 - - Expected string or char literal - 预期的字符串或字符文本 - - Node does not descend from root. 节点并非源自根。 @@ -42,16 +27,6 @@ 节点不在父级的子列表中 - - Null-checking preferences - Null 检查首选项 - - - - Pattern matching preferences - 模式匹配首选项 - - R&emove and Sort Usings 删除 Using 和对其排序(&E) @@ -92,16 +67,6 @@ 包装首选项 - - 'using' directive preferences - "using" 指令首选项 - {Locked="using"} "using" is a C# keyword and should not be localized. - - - var preferences - var 首选项 - - \ No newline at end of file diff --git a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.zh-Hant.xlf b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.zh-Hant.xlf index 5fe3512eb85e0..9e24387134fb9 100644 --- a/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.zh-Hant.xlf +++ b/src/Workspaces/CSharp/Portable/xlf/CSharpWorkspaceResources.zh-Hant.xlf @@ -2,16 +2,6 @@ - - Code-block preferences - 程式碼區塊喜好設定 - - - - Expression-bodied members - 運算式主體成員 - - Indentation preferences 縮排喜好設定 @@ -27,11 +17,6 @@ 無法將命名空間加入此目的地。 - - Expected string or char literal - 必須是字串或字元常值 - - Node does not descend from root. 節點不是根的子系。 @@ -42,16 +27,6 @@ 節點不在父代的子清單中 - - Null-checking preferences - Null 檢查喜好設定 - - - - Pattern matching preferences - 模式比對喜好設定 - - R&emove and Sort Usings 移除和排序 Using(&E) @@ -92,16 +67,6 @@ 換行喜好設定 - - 'using' directive preferences - 'using' 指示詞的喜好設定 - {Locked="using"} "using" is a C# keyword and should not be localized. - - - var preferences - var 喜好設定 - - \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/CodeStyle/CodeStyleOption.cs b/src/Workspaces/Core/Portable/CodeStyle/CodeStyleOption.cs index c74089720b38d..f3e47026ab3f2 100644 --- a/src/Workspaces/Core/Portable/CodeStyle/CodeStyleOption.cs +++ b/src/Workspaces/Core/Portable/CodeStyle/CodeStyleOption.cs @@ -7,7 +7,11 @@ using System.Xml.Linq; using Microsoft.CodeAnalysis.Diagnostics; +#if CODE_STYLE +namespace Microsoft.CodeAnalysis.Internal.Options +#else namespace Microsoft.CodeAnalysis.CodeStyle +#endif { internal interface ICodeStyleOption { diff --git a/src/Workspaces/Core/Portable/CodeStyle/CodeStyleOptions.cs b/src/Workspaces/Core/Portable/CodeStyle/CodeStyleOptions.cs index 3f514a21bf4a3..4147259ea812b 100644 --- a/src/Workspaces/Core/Portable/CodeStyle/CodeStyleOptions.cs +++ b/src/Workspaces/Core/Portable/CodeStyle/CodeStyleOptions.cs @@ -4,11 +4,16 @@ using System.Collections.Immutable; using System.Diagnostics; -using Microsoft.CodeAnalysis.Options; using Roslyn.Utilities; using static Microsoft.CodeAnalysis.CodeStyle.CodeStyleHelpers; +#if CODE_STYLE +namespace Microsoft.CodeAnalysis.Internal.Options +#else +using Microsoft.CodeAnalysis.Options; + namespace Microsoft.CodeAnalysis.CodeStyle +#endif { public class CodeStyleOptions { @@ -403,13 +408,13 @@ private static string GetUnusedParametersPreferenceEditorConfigString(CodeStyleO internal static class CodeStyleOptionGroups { - public static readonly OptionGroup Usings = new OptionGroup(WorkspacesResources.Organize_usings, priority: 1); - public static readonly OptionGroup ThisOrMe = new OptionGroup(WorkspacesResources.this_dot_and_Me_dot_preferences, priority: 2); - public static readonly OptionGroup PredefinedTypeNameUsage = new OptionGroup(WorkspacesResources.Language_keywords_vs_BCL_types_preferences, priority: 3); - public static readonly OptionGroup Parentheses = new OptionGroup(WorkspacesResources.Parentheses_preferences, priority: 4); - public static readonly OptionGroup Modifier = new OptionGroup(WorkspacesResources.Modifier_preferences, priority: 5); - public static readonly OptionGroup ExpressionLevelPreferences = new OptionGroup(WorkspacesResources.Expression_level_preferences, priority: 6); - public static readonly OptionGroup Field = new OptionGroup(WorkspacesResources.Field_preferences, priority: 7); - public static readonly OptionGroup Parameter = new OptionGroup(WorkspacesResources.Parameter_preferences, priority: 8); + public static readonly OptionGroup Usings = new OptionGroup(CompilerExtensionsResources.Organize_usings, priority: 1); + public static readonly OptionGroup ThisOrMe = new OptionGroup(CompilerExtensionsResources.this_dot_and_Me_dot_preferences, priority: 2); + public static readonly OptionGroup PredefinedTypeNameUsage = new OptionGroup(CompilerExtensionsResources.Language_keywords_vs_BCL_types_preferences, priority: 3); + public static readonly OptionGroup Parentheses = new OptionGroup(CompilerExtensionsResources.Parentheses_preferences, priority: 4); + public static readonly OptionGroup Modifier = new OptionGroup(CompilerExtensionsResources.Modifier_preferences, priority: 5); + public static readonly OptionGroup ExpressionLevelPreferences = new OptionGroup(CompilerExtensionsResources.Expression_level_preferences, priority: 6); + public static readonly OptionGroup Field = new OptionGroup(CompilerExtensionsResources.Field_preferences, priority: 7); + public static readonly OptionGroup Parameter = new OptionGroup(CompilerExtensionsResources.Parameter_preferences, priority: 8); } } diff --git a/src/Workspaces/Core/Portable/CodeStyle/NotificationOption.cs b/src/Workspaces/Core/Portable/CodeStyle/NotificationOption.cs index dc9e6b9843b98..0e12008f38485 100644 --- a/src/Workspaces/Core/Portable/CodeStyle/NotificationOption.cs +++ b/src/Workspaces/Core/Portable/CodeStyle/NotificationOption.cs @@ -7,9 +7,11 @@ #if CODE_STYLE using WorkspacesResources = Microsoft.CodeAnalysis.CodeStyleResources; -#endif +namespace Microsoft.CodeAnalysis.Internal.Options +#else namespace Microsoft.CodeAnalysis.CodeStyle +#endif { /// /// Offers different notification styles for enforcing diff --git a/src/Workspaces/Core/Portable/Formatting/Engine/AbstractFormatEngine.cs b/src/Workspaces/Core/Portable/Formatting/Engine/AbstractFormatEngine.cs index 3b729112cff5e..46315e375de31 100644 --- a/src/Workspaces/Core/Portable/Formatting/Engine/AbstractFormatEngine.cs +++ b/src/Workspaces/Core/Portable/Formatting/Engine/AbstractFormatEngine.cs @@ -8,7 +8,6 @@ using System.Threading; using Microsoft.CodeAnalysis.Formatting.Rules; using Microsoft.CodeAnalysis.Internal.Log; -using Microsoft.CodeAnalysis.Options; using Microsoft.CodeAnalysis.Shared.Extensions; using Microsoft.CodeAnalysis.Shared.Utilities; using Microsoft.CodeAnalysis.Text; @@ -16,6 +15,9 @@ #if CODE_STYLE using OptionSet = Microsoft.CodeAnalysis.Diagnostics.AnalyzerConfigOptions; +using Microsoft.CodeAnalysis.Internal.Options; +#else +using Microsoft.CodeAnalysis.Options; #endif namespace Microsoft.CodeAnalysis.Formatting diff --git a/src/Workspaces/Core/Portable/Formatting/FormattingOptions.cs b/src/Workspaces/Core/Portable/Formatting/FormattingOptions.cs index 2eb34fdd956d3..2344bb58e492f 100644 --- a/src/Workspaces/Core/Portable/Formatting/FormattingOptions.cs +++ b/src/Workspaces/Core/Portable/Formatting/FormattingOptions.cs @@ -4,11 +4,13 @@ using System; using System.Collections.Immutable; -using Microsoft.CodeAnalysis.Options; using Roslyn.Utilities; #if CODE_STYLE +using Microsoft.CodeAnalysis.Internal.Options; using WorkspacesResources = Microsoft.CodeAnalysis.CodeStyleResources; +#else +using Microsoft.CodeAnalysis.Options; #endif namespace Microsoft.CodeAnalysis.Formatting diff --git a/src/Workspaces/Core/Portable/Log/FunctionIdOptions.cs b/src/Workspaces/Core/Portable/Log/FunctionIdOptions.cs index be6303b0b0aa5..2179e564f8c60 100644 --- a/src/Workspaces/Core/Portable/Log/FunctionIdOptions.cs +++ b/src/Workspaces/Core/Portable/Log/FunctionIdOptions.cs @@ -4,7 +4,12 @@ using System; using System.Collections.Concurrent; + +#if CODE_STYLE +using Microsoft.CodeAnalysis.Internal.Options; +#else using Microsoft.CodeAnalysis.Options; +#endif namespace Microsoft.CodeAnalysis.Internal.Log { diff --git a/src/Workspaces/Core/Portable/Log/Logger.cs b/src/Workspaces/Core/Portable/Log/Logger.cs index 09a7e2ad911bc..4e6e3886d5bdf 100644 --- a/src/Workspaces/Core/Portable/Log/Logger.cs +++ b/src/Workspaces/Core/Portable/Log/Logger.cs @@ -5,7 +5,12 @@ using System; using System.Linq; using System.Threading; + +#if CODE_STYLE +using Microsoft.CodeAnalysis.Internal.Options; +#else using Microsoft.CodeAnalysis.Options; +#endif namespace Microsoft.CodeAnalysis.Internal.Log { diff --git a/src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj b/src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj index be6bb52531441..e3143cd3f2b6b 100644 --- a/src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj +++ b/src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj @@ -97,6 +97,7 @@ + @@ -123,6 +124,12 @@ + + + + + + True diff --git a/src/Workspaces/Core/Portable/Options/EditorConfig/EditorConfigStorageLocation.cs b/src/Workspaces/Core/Portable/Options/EditorConfig/EditorConfigStorageLocation.cs index 764982f987601..eb345fae2d298 100644 --- a/src/Workspaces/Core/Portable/Options/EditorConfig/EditorConfigStorageLocation.cs +++ b/src/Workspaces/Core/Portable/Options/EditorConfig/EditorConfigStorageLocation.cs @@ -5,7 +5,11 @@ using System; using Microsoft.CodeAnalysis.CodeStyle; +#if CODE_STYLE +namespace Microsoft.CodeAnalysis.Internal.Options +#else namespace Microsoft.CodeAnalysis.Options +#endif { internal static class EditorConfigStorageLocation { diff --git a/src/Workspaces/Core/Portable/Options/EditorConfig/EditorConfigStorageLocation`1.cs b/src/Workspaces/Core/Portable/Options/EditorConfig/EditorConfigStorageLocation`1.cs index 99d97e65ede68..cc470ebfeb410 100644 --- a/src/Workspaces/Core/Portable/Options/EditorConfig/EditorConfigStorageLocation`1.cs +++ b/src/Workspaces/Core/Portable/Options/EditorConfig/EditorConfigStorageLocation`1.cs @@ -9,9 +9,11 @@ #if CODE_STYLE using OptionSet = Microsoft.CodeAnalysis.Diagnostics.AnalyzerConfigOptions; -#endif +namespace Microsoft.CodeAnalysis.Internal.Options +#else namespace Microsoft.CodeAnalysis.Options +#endif { /// /// Specifies that an option should be read from an .editorconfig file. diff --git a/src/Workspaces/Core/Portable/Options/EditorConfig/IEditorConfigStorageLocation.cs b/src/Workspaces/Core/Portable/Options/EditorConfig/IEditorConfigStorageLocation.cs index 0589c03cc014f..ff32aae74cc22 100644 --- a/src/Workspaces/Core/Portable/Options/EditorConfig/IEditorConfigStorageLocation.cs +++ b/src/Workspaces/Core/Portable/Options/EditorConfig/IEditorConfigStorageLocation.cs @@ -5,9 +5,15 @@ using System; using System.Collections.Generic; +#if CODE_STYLE +namespace Microsoft.CodeAnalysis.Internal.Options +{ + public interface IEditorConfigStorageLocation +#else namespace Microsoft.CodeAnalysis.Options { internal interface IEditorConfigStorageLocation +#endif { bool TryGetOption(IReadOnlyDictionary rawOptions, Type type, out object value); } diff --git a/src/Workspaces/Core/Portable/Options/EditorConfig/IEditorConfigStorageLocation2.cs b/src/Workspaces/Core/Portable/Options/EditorConfig/IEditorConfigStorageLocation2.cs index ce4a65dcf620f..71f8ba19d0134 100644 --- a/src/Workspaces/Core/Portable/Options/EditorConfig/IEditorConfigStorageLocation2.cs +++ b/src/Workspaces/Core/Portable/Options/EditorConfig/IEditorConfigStorageLocation2.cs @@ -4,11 +4,15 @@ #if CODE_STYLE using OptionSet = Microsoft.CodeAnalysis.Diagnostics.AnalyzerConfigOptions; -#endif +namespace Microsoft.CodeAnalysis.Internal.Options +{ + public interface IEditorConfigStorageLocation2 : IEditorConfigStorageLocation +#else namespace Microsoft.CodeAnalysis.Options { internal interface IEditorConfigStorageLocation2 : IEditorConfigStorageLocation +#endif { /// /// Gets the editorconfig string representation for this storage location. diff --git a/src/Workspaces/Core/Portable/Options/IOption.cs b/src/Workspaces/Core/Portable/Options/IOption.cs index e515933f6158b..e34e0f10bacdb 100644 --- a/src/Workspaces/Core/Portable/Options/IOption.cs +++ b/src/Workspaces/Core/Portable/Options/IOption.cs @@ -7,7 +7,11 @@ using System; using System.Collections.Immutable; +#if CODE_STYLE +namespace Microsoft.CodeAnalysis.Internal.Options +#else namespace Microsoft.CodeAnalysis.Options +#endif { public interface IOption { diff --git a/src/Workspaces/Core/Portable/Options/IOptionWithGroup.cs b/src/Workspaces/Core/Portable/Options/IOptionWithGroup.cs index f14f9bc04d76f..0381b5811bb57 100644 --- a/src/Workspaces/Core/Portable/Options/IOptionWithGroup.cs +++ b/src/Workspaces/Core/Portable/Options/IOptionWithGroup.cs @@ -2,7 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if CODE_STYLE +namespace Microsoft.CodeAnalysis.Internal.Options +#else namespace Microsoft.CodeAnalysis.Options +#endif { /// /// Group/sub-feature associated with an . diff --git a/src/Workspaces/Core/Portable/Options/LocalUserProfileStorageLocation.cs b/src/Workspaces/Core/Portable/Options/LocalUserProfileStorageLocation.cs index 0c44a1a45c797..a5c42ad82ed7e 100644 --- a/src/Workspaces/Core/Portable/Options/LocalUserProfileStorageLocation.cs +++ b/src/Workspaces/Core/Portable/Options/LocalUserProfileStorageLocation.cs @@ -2,7 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if CODE_STYLE +namespace Microsoft.CodeAnalysis.Internal.Options +#else namespace Microsoft.CodeAnalysis.Options +#endif { /// /// Specifies that the option should be stored into the user's local registry hive. diff --git a/src/Workspaces/Core/Portable/Options/OptionGroup.cs b/src/Workspaces/Core/Portable/Options/OptionGroup.cs index e41cc18e3dee6..4fe35d7cf2c7b 100644 --- a/src/Workspaces/Core/Portable/Options/OptionGroup.cs +++ b/src/Workspaces/Core/Portable/Options/OptionGroup.cs @@ -4,7 +4,11 @@ using System; +#if CODE_STYLE +namespace Microsoft.CodeAnalysis.Internal.Options +#else namespace Microsoft.CodeAnalysis.Options +#endif { /// /// Group/sub-feature associated with an . diff --git a/src/Workspaces/Core/Portable/Options/OptionKey.cs b/src/Workspaces/Core/Portable/Options/OptionKey.cs index 4900d0e910b5d..34730dc6538a7 100644 --- a/src/Workspaces/Core/Portable/Options/OptionKey.cs +++ b/src/Workspaces/Core/Portable/Options/OptionKey.cs @@ -8,7 +8,11 @@ using WorkspacesResources = Microsoft.CodeAnalysis.CodeStyleResources; #endif +#if CODE_STYLE +namespace Microsoft.CodeAnalysis.Internal.Options +#else namespace Microsoft.CodeAnalysis.Options +#endif { public readonly struct OptionKey : IEquatable { diff --git a/src/Workspaces/Core/Portable/Options/OptionStorageLocation.cs b/src/Workspaces/Core/Portable/Options/OptionStorageLocation.cs index 14c7cf93197b0..4bd602d00ddcf 100644 --- a/src/Workspaces/Core/Portable/Options/OptionStorageLocation.cs +++ b/src/Workspaces/Core/Portable/Options/OptionStorageLocation.cs @@ -2,7 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if CODE_STYLE +namespace Microsoft.CodeAnalysis.Internal.Options +#else namespace Microsoft.CodeAnalysis.Options +#endif { /// /// The base type of all types that specify where options are stored. diff --git a/src/Workspaces/Core/Portable/Options/Option`1.cs b/src/Workspaces/Core/Portable/Options/Option`1.cs index b2536e9e3e3a4..741949da71a8b 100644 --- a/src/Workspaces/Core/Portable/Options/Option`1.cs +++ b/src/Workspaces/Core/Portable/Options/Option`1.cs @@ -5,7 +5,11 @@ using System; using System.Collections.Immutable; +#if CODE_STYLE +namespace Microsoft.CodeAnalysis.Internal.Options +#else namespace Microsoft.CodeAnalysis.Options +#endif { /// /// Marker interface for diff --git a/src/Workspaces/Core/Portable/Options/PerLanguageOption.cs b/src/Workspaces/Core/Portable/Options/PerLanguageOption.cs index 65de2989be7a8..86f6a4347a142 100644 --- a/src/Workspaces/Core/Portable/Options/PerLanguageOption.cs +++ b/src/Workspaces/Core/Portable/Options/PerLanguageOption.cs @@ -5,7 +5,11 @@ using System; using System.Collections.Immutable; +#if CODE_STYLE +namespace Microsoft.CodeAnalysis.Internal.Options +#else namespace Microsoft.CodeAnalysis.Options +#endif { /// /// Marker interface for diff --git a/src/Workspaces/Core/Portable/Options/RoamingProfileStorageLocation.cs b/src/Workspaces/Core/Portable/Options/RoamingProfileStorageLocation.cs index b58886bba9aa4..dbb40b9df4c16 100644 --- a/src/Workspaces/Core/Portable/Options/RoamingProfileStorageLocation.cs +++ b/src/Workspaces/Core/Portable/Options/RoamingProfileStorageLocation.cs @@ -4,7 +4,11 @@ using System; +#if CODE_STYLE +namespace Microsoft.CodeAnalysis.Internal.Options +#else namespace Microsoft.CodeAnalysis.Options +#endif { /// /// Specifies that the option should be stored into a roamed profile across machines. diff --git a/src/Workspaces/Core/Portable/WorkspacesResources.resx b/src/Workspaces/Core/Portable/WorkspacesResources.resx index fe92413f9188c..00252d4e8ba5d 100644 --- a/src/Workspaces/Core/Portable/WorkspacesResources.resx +++ b/src/Workspaces/Core/Portable/WorkspacesResources.resx @@ -1425,42 +1425,18 @@ Zero-width positive lookbehind assertions are typically used at the beginning of .NET Coding Conventions - - Expression-level preferences - - - Field preferences - Indentation and spacing - - Language keywords vs BCL types preferences - - - Modifier preferences - New line preferences - - Organize usings - - - Parentheses preferences - - - this. and Me. preferences - Visual Basic files Changing document '{0}' is not supported. - - Parameter preferences - Prefix '{0}' does not match expected prefix '{1}' diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.cs.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.cs.xlf index 3b9bba885af96..fbfe336bbd4ee 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.cs.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.cs.xlf @@ -57,14 +57,19 @@ Při čtení obsahu zdrojového souboru {0} došlo k chybě -- {1} - - Expression-level preferences - Předvolby na úrovni výrazů + + Fix all '{0}' + Fix all '{0}' + + + + Fix all '{0}' in '{1}' + Fix all '{0}' in '{1}' - - Field preferences - Předvolby polí + + Fix all '{0}' in Solution + Fix all '{0}' in Solution @@ -72,16 +77,6 @@ Odsazení a mezery - - Language keywords vs BCL types preferences - Předvolby klíčových slov jazyka a typů BCL - - - - Modifier preferences - Předvolby modifikátorů - - Naming rules Pravidla pojmenování @@ -102,16 +97,6 @@ Možnosti nepocházely ze zadaného řešení. - - Organize usings - Uspořádat direktivy using - - - - Parentheses preferences - Předvolby závorek - - Prefix '{0}' does not match expected prefix '{1}' Předpona {0} neodpovídá očekávané předponě {1}. @@ -1257,6 +1242,11 @@ Pozitivní kontrolní výrazy zpětného vyhledávání s nulovou délkou se obv Odebírání dokumentů konfigurace analyzátoru se nepodporuje. + + Supplied diagnostic cannot be null. + Supplied diagnostic cannot be null. + + Symbol "{0}" is not from source. Symbol {0} nepochází ze zdroje. @@ -1637,21 +1627,6 @@ Pozitivní kontrolní výrazy zpětného vyhledávání s nulovou délkou se obv Přidáno: - - Fix all '{0}' - Opravit vše ({0}) - - - - Fix all '{0}' in '{1}' - Opravit vše ({0}) v: {1} - - - - Fix all '{0}' in Solution - Opravit vše ({0}) v řešení - - After: Po: @@ -1742,11 +1717,6 @@ Pozitivní kontrolní výrazy zpětného vyhledávání s nulovou délkou se obv Ke splnění úkolu se vyžaduje služba typu {0}, není ale z pracovního prostoru dostupná. - - Supplied diagnostic cannot be null. - Zadaná diagnostika nemůže být null. - - At least one diagnostic must be supplied. Musí se zadat aspoň jedna diagnostika. @@ -2217,11 +2187,6 @@ Pozitivní kontrolní výrazy zpětného vyhledávání s nulovou délkou se obv Konvence kódování v .NET - - this. and Me. preferences - Předvolby pro this. a Me. - - [x-y] range in reverse order Rozsah [x-y] je v obráceném pořadí. @@ -2237,11 +2202,6 @@ Pozitivní kontrolní výrazy zpětného vyhledávání s nulovou délkou se obv Problém s regulárním výrazem: {0} This is an error message shown to the user when they write an invalid Regular Expression. {0} will be the actual text of one of the above Regular Expression errors. - - Parameter preferences - Předvolby parametrů - - \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.de.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.de.xlf index e7667b6fc7e03..e7f65390c58ec 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.de.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.de.xlf @@ -57,14 +57,19 @@ Fehler beim Lesen des Inhalts der Quelldatei "{0}": "{1}". - - Expression-level preferences - Einstellungen für Ausdrucksebene + + Fix all '{0}' + Fix all '{0}' + + + + Fix all '{0}' in '{1}' + Fix all '{0}' in '{1}' - - Field preferences - Einstellungen für Felder + + Fix all '{0}' in Solution + Fix all '{0}' in Solution @@ -72,16 +77,6 @@ Einzüge und Abstände - - Language keywords vs BCL types preferences - Einstellungen für Sprachschlüsselwörter und BCL-Typen - - - - Modifier preferences - Einstellungen für Modifizierer - - Naming rules Benennungsregeln @@ -102,16 +97,6 @@ Optionen stammen nicht aus der angegebenen Projektmappe. - - Organize usings - Using-Direktiven organisieren - - - - Parentheses preferences - Einstellungen für Klammern - - Prefix '{0}' does not match expected prefix '{1}' Das Präfix "{0}" entspricht nicht dem erwarteten Präfix "{1}". @@ -1257,6 +1242,11 @@ Positive Lookbehindassertionen mit Nullbreite werden normalerweise am Anfang reg Das Entfernen von Konfigurationsdokumenten des Analysetools wird nicht unterstützt. + + Supplied diagnostic cannot be null. + Supplied diagnostic cannot be null. + + Symbol "{0}" is not from source. Symbol "{0}" ist nicht aus Quelle. @@ -1637,21 +1627,6 @@ Positive Lookbehindassertionen mit Nullbreite werden normalerweise am Anfang reg Hinzugefügt: - - Fix all '{0}' - Alle '{0}' reparieren - - - - Fix all '{0}' in '{1}' - Alle '{0}' in '{1}' reparieren - - - - Fix all '{0}' in Solution - Alle '{0}' in Lösung reparieren - - After: Nach: @@ -1742,11 +1717,6 @@ Positive Lookbehindassertionen mit Nullbreite werden normalerweise am Anfang reg Ein Dienst vom Typ "{0}" ist zum Ausführen der Aufgabe erforderlich, steht aber im Arbeitsbereich nicht zur Verfügung. - - Supplied diagnostic cannot be null. - Bereitgestellte Diagnose darf nicht null sein. - - At least one diagnostic must be supplied. Es muss mindestens eine Diagnose bereitgestellt sein. @@ -2217,11 +2187,6 @@ Positive Lookbehindassertionen mit Nullbreite werden normalerweise am Anfang reg .NET-Codierungskonventionen - - this. and Me. preferences - this.- und Me.-Einstellungen - - [x-y] range in reverse order [x-y]-Bereich in umgekehrter Reihenfolge @@ -2237,11 +2202,6 @@ Positive Lookbehindassertionen mit Nullbreite werden normalerweise am Anfang reg RegEx-Fehler: {0} This is an error message shown to the user when they write an invalid Regular Expression. {0} will be the actual text of one of the above Regular Expression errors. - - Parameter preferences - Einstellungen für Parameter - - \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.es.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.es.xlf index 60abf5843e7df..b5ed6628c2ffc 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.es.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.es.xlf @@ -57,14 +57,19 @@ Error al leer el contenido del archivo de origen "{0}"--"{1}". - - Expression-level preferences - Preferencias de nivel de expresión + + Fix all '{0}' + Fix all '{0}' + + + + Fix all '{0}' in '{1}' + Fix all '{0}' in '{1}' - - Field preferences - Preferencias de campo + + Fix all '{0}' in Solution + Fix all '{0}' in Solution @@ -72,16 +77,6 @@ Sangría y espaciado - - Language keywords vs BCL types preferences - Preferencias de palabras clave frente a tipos de BCL - - - - Modifier preferences - Preferencias de modificador - - Naming rules Reglas de nomenclatura @@ -102,16 +97,6 @@ Las opciones no procedían de la solución especificada. - - Organize usings - Organizar instrucciones Using - - - - Parentheses preferences - Preferencias de paréntesis - - Prefix '{0}' does not match expected prefix '{1}' El prefijo "{0}" no coincide con el prefijo esperado "{1}". @@ -1257,6 +1242,11 @@ Las aserciones de búsqueda retrasada (lookbehind) positivas de ancho cero se us No se permite quitar documentos de configuración del analizador. + + Supplied diagnostic cannot be null. + Supplied diagnostic cannot be null. + + Symbol "{0}" is not from source. El símbolo "{0}" no procede del código fuente. @@ -1637,21 +1627,6 @@ Las aserciones de búsqueda retrasada (lookbehind) positivas de ancho cero se us Agregado: - - Fix all '{0}' - Corregir todo '{0}' - - - - Fix all '{0}' in '{1}' - Corregir todo '{0}' en '{1}' - - - - Fix all '{0}' in Solution - Corregir todo '{0}' en solución - - After: Después: @@ -1742,11 +1717,6 @@ Las aserciones de búsqueda retrasada (lookbehind) positivas de ancho cero se us El servicio de tipo '{0}' es necesario para realizar la tarea, pero no está disponibles desde el área de trabajo. - - Supplied diagnostic cannot be null. - El diagnóstico suministrado no puede ser nulo. - - At least one diagnostic must be supplied. Se debe suministrar al menos un diagnóstico. @@ -2217,11 +2187,6 @@ Las aserciones de búsqueda retrasada (lookbehind) positivas de ancho cero se us Convenciones de codificación .NET - - this. and Me. preferences - Preferencias de this. y .me - - [x-y] range in reverse order rango [x-y] en orden inverso @@ -2237,11 +2202,6 @@ Las aserciones de búsqueda retrasada (lookbehind) positivas de ancho cero se us Problema de Regex: {0} This is an error message shown to the user when they write an invalid Regular Expression. {0} will be the actual text of one of the above Regular Expression errors. - - Parameter preferences - Preferencias de parámetro - - \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.fr.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.fr.xlf index 6366d269351a4..5fb03465492ea 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.fr.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.fr.xlf @@ -57,14 +57,19 @@ Erreur durant la lecture du contenu du fichier source '{0}' -- '{1}'. - - Expression-level preferences - Préférences de niveau expression + + Fix all '{0}' + Fix all '{0}' + + + + Fix all '{0}' in '{1}' + Fix all '{0}' in '{1}' - - Field preferences - Préférences de champ + + Fix all '{0}' in Solution + Fix all '{0}' in Solution @@ -72,16 +77,6 @@ Indentation et espacement - - Language keywords vs BCL types preferences - Préférences des mots clés de langage par rapport aux types BCL - - - - Modifier preferences - Préférences de modificateur - - Naming rules Règles de nommage @@ -102,16 +97,6 @@ Les options ne proviennent pas de la solution spécifiée - - Organize usings - Organiser les instructions Using - - - - Parentheses preferences - Préférences de parenthèses - - Prefix '{0}' does not match expected prefix '{1}' Le préfixe « {0} » ne correspond pas au préfixe attendu « {1} » @@ -1257,6 +1242,11 @@ Les assertions arrière positives de largeur nulle sont généralement utilisée La suppression de documents de configuration de l'analyseur n'est pas prise en charge. + + Supplied diagnostic cannot be null. + Supplied diagnostic cannot be null. + + Symbol "{0}" is not from source. Le symbole "{0}" ne provient pas de la source. @@ -1637,21 +1627,6 @@ Les assertions arrière positives de largeur nulle sont généralement utilisée Ajouté : - - Fix all '{0}' - Corriger tous les '{0}' - - - - Fix all '{0}' in '{1}' - Pour toutes les '{0}' dans '{1}' - - - - Fix all '{0}' in Solution - Corriger tous les '{0}' dans la solution - - After: Après : @@ -1742,11 +1717,6 @@ Les assertions arrière positives de largeur nulle sont généralement utilisée Le service de type '{0}' est nécessaire pour accomplir la tâche mais n'est pas disponible dans l'espace de travail. - - Supplied diagnostic cannot be null. - Le diagnostic fourni ne peut pas être null. - - At least one diagnostic must be supplied. Au moins un diagnostic doit être fourni. @@ -2217,11 +2187,6 @@ Les assertions arrière positives de largeur nulle sont généralement utilisée Conventions de codage .NET - - this. and Me. preferences - Préférences de this. et Me. - - [x-y] range in reverse order Intervalle [x-y] dans l'ordre inverse @@ -2237,11 +2202,6 @@ Les assertions arrière positives de largeur nulle sont généralement utilisée Problème de regex : {0} This is an error message shown to the user when they write an invalid Regular Expression. {0} will be the actual text of one of the above Regular Expression errors. - - Parameter preferences - Préférences de paramètre - - \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.it.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.it.xlf index 992057b2a0a6e..ecc5e632ff93b 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.it.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.it.xlf @@ -57,14 +57,19 @@ Si è verificato un errore durante la lettura del contenuto del file di origine '{0}' - '{1}'. - - Expression-level preferences - Preferenze a livello di espressione + + Fix all '{0}' + Fix all '{0}' + + + + Fix all '{0}' in '{1}' + Fix all '{0}' in '{1}' - - Field preferences - Preferenze per campi + + Fix all '{0}' in Solution + Fix all '{0}' in Solution @@ -72,16 +77,6 @@ Rientro e spaziatura - - Language keywords vs BCL types preferences - Preferenze per parole chiave linguaggio rispetto a tipi BCL - - - - Modifier preferences - Preferenze per modificatore - - Naming rules Regole di denominazione @@ -102,16 +97,6 @@ Le opzioni non provengono dalla soluzione specificata - - Organize usings - Organizza using - - - - Parentheses preferences - Preferenze per parentesi - - Prefix '{0}' does not match expected prefix '{1}' Il prefisso '{0}' non corrisponde al prefisso previsto '{1}' @@ -1257,6 +1242,11 @@ Le asserzioni lookbehind positive di larghezza zero vengono usate in genere all' La rimozione di documenti di configurazione dell'analizzatore non è supportata. + + Supplied diagnostic cannot be null. + Supplied diagnostic cannot be null. + + Symbol "{0}" is not from source. Il simbolo "{0}" non proviene dall'origine. @@ -1637,21 +1627,6 @@ Le asserzioni lookbehind positive di larghezza zero vengono usate in genere all' Aggiunto: - - Fix all '{0}' - Correggi tutti '{0}' - - - - Fix all '{0}' in '{1}' - Correggi tutti '{0}' in '{1}' - - - - Fix all '{0}' in Solution - Correggi tutti '{0}' nella soluzione - - After: Dopo: @@ -1742,11 +1717,6 @@ Le asserzioni lookbehind positive di larghezza zero vengono usate in genere all' Per eseguire l'attività, è necessario il servizio di tipo '{0}', che però non è disponibile dall'area di lavoro. - - Supplied diagnostic cannot be null. - La diagnostica specificata non può essere Null. - - At least one diagnostic must be supplied. È necessario specificare almeno una diagnostica. @@ -2217,11 +2187,6 @@ Le asserzioni lookbehind positive di larghezza zero vengono usate in genere all' Convenzioni di scrittura codice .NET - - this. and Me. preferences - Preferenze per this. e Me. - - [x-y] range in reverse order Intervallo [x-y] in ordine inverso @@ -2237,11 +2202,6 @@ Le asserzioni lookbehind positive di larghezza zero vengono usate in genere all' Problema di regex: {0} This is an error message shown to the user when they write an invalid Regular Expression. {0} will be the actual text of one of the above Regular Expression errors. - - Parameter preferences - Preferenze per parametri - - \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ja.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ja.xlf index 0cd2e1db7d9f2..d490ebac80a24 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ja.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ja.xlf @@ -57,14 +57,19 @@ ソース ファイル '{0}' のコンテンツの読み取りでエラーが発生しました -- '{1}'。 - - Expression-level preferences - 式レベルの設定 + + Fix all '{0}' + Fix all '{0}' + + + + Fix all '{0}' in '{1}' + Fix all '{0}' in '{1}' - - Field preferences - フィールド設定 + + Fix all '{0}' in Solution + Fix all '{0}' in Solution @@ -72,16 +77,6 @@ インデントと間隔 - - Language keywords vs BCL types preferences - 言語キーワードと BCL の種類の設定 - - - - Modifier preferences - 修飾子設定 - - Naming rules 名前付けルール @@ -102,16 +97,6 @@ オプションは指定されたソリューションに由来するものではありません - - Organize usings - using の整理 - - - - Parentheses preferences - かっこの設定 - - Prefix '{0}' does not match expected prefix '{1}' プレフィックス '{0}' が予想されるプレフィックス '{1}' と一致しません @@ -1257,6 +1242,11 @@ Zero-width positive lookbehind assertions are typically used at the beginning of アナライザー構成ドキュメントの削除はサポートされていません。 + + Supplied diagnostic cannot be null. + Supplied diagnostic cannot be null. + + Symbol "{0}" is not from source. シンボル "{0}" は、ソースからではありません。 @@ -1637,21 +1627,6 @@ Zero-width positive lookbehind assertions are typically used at the beginning of 追加済み: - - Fix all '{0}' - すべての '{0}' を修正します - - - - Fix all '{0}' in '{1}' - {1}' に含まれているすべての '{0}' を修正します - - - - Fix all '{0}' in Solution - ソリューションに含まれているすべての '{0}' を修正します - - After: 後: @@ -1742,11 +1717,6 @@ Zero-width positive lookbehind assertions are typically used at the beginning of 型 '{0}' のサービスはタスクの実行に必要ですが、このワークスペースからは利用できません。 - - Supplied diagnostic cannot be null. - 診断に null は指定できません。 - - At least one diagnostic must be supplied. 1 つ以上の診断を指定しなければなりません。 @@ -2217,11 +2187,6 @@ Zero-width positive lookbehind assertions are typically used at the beginning of .NET コーディング規則 - - this. and Me. preferences - this. と Me. の設定 - - [x-y] range in reverse order [x-y] 範囲の順序が逆です @@ -2237,11 +2202,6 @@ Zero-width positive lookbehind assertions are typically used at the beginning of 正規表現の問題: {0} This is an error message shown to the user when they write an invalid Regular Expression. {0} will be the actual text of one of the above Regular Expression errors. - - Parameter preferences - パラメーターの設定 - - \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ko.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ko.xlf index 2a6ea5ad3e3ed..b306794dbfae1 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ko.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ko.xlf @@ -57,14 +57,19 @@ 소스 파일 '{0}'의 콘텐츠를 읽는 동안 오류가 발생했습니다. -- '{1}'. - - Expression-level preferences - 식 수준 기본 설정 + + Fix all '{0}' + Fix all '{0}' + + + + Fix all '{0}' in '{1}' + Fix all '{0}' in '{1}' - - Field preferences - 필드 기본 설정 + + Fix all '{0}' in Solution + Fix all '{0}' in Solution @@ -72,16 +77,6 @@ 들여쓰기 및 간격 - - Language keywords vs BCL types preferences - 언어 키워드 및 BCL 형식 기본 설정 - - - - Modifier preferences - 한정자 기본 설정 - - Naming rules 명명 규칙 @@ -102,16 +97,6 @@ 옵션을 지정된 솔루션에서 가져오지 않음 - - Organize usings - Using 구성 - - - - Parentheses preferences - 괄호 기본 설정 - - Prefix '{0}' does not match expected prefix '{1}' 접두사 '{0}'이(가) 필요한 접두사 '{1}'과(와) 일치하지 않습니다. @@ -1257,6 +1242,11 @@ Zero-width positive lookbehind assertions are typically used at the beginning of 분석기 구성 문서 제거는 지원되지 않습니다. + + Supplied diagnostic cannot be null. + Supplied diagnostic cannot be null. + + Symbol "{0}" is not from source. "{0}" 기호가 소스에 없습니다. @@ -1637,21 +1627,6 @@ Zero-width positive lookbehind assertions are typically used at the beginning of 추가됨: - - Fix all '{0}' - 모든 '{0}' 수정 - - - - Fix all '{0}' in '{1}' - {1}'의 모든 '{0}' 수정 - - - - Fix all '{0}' in Solution - 솔루션의 모든 '{0}' 수정 - - After: 이후: @@ -1742,11 +1717,6 @@ Zero-width positive lookbehind assertions are typically used at the beginning of {0}' 유형의 서비스가 작업을 수행하는 데 필요하지만 작업 영역에서 사용할 수 없습니다. - - Supplied diagnostic cannot be null. - 제공된 진단은 null일 수 없습니다. - - At least one diagnostic must be supplied. 하나 이상의 진단을 제공해야 합니다. @@ -2217,11 +2187,6 @@ Zero-width positive lookbehind assertions are typically used at the beginning of .NET 코딩 규칙 - - this. and Me. preferences - this. 및 Me. 기본 설정 - - [x-y] range in reverse order [x-y] 범위가 역순으로 되어 있습니다. @@ -2237,11 +2202,6 @@ Zero-width positive lookbehind assertions are typically used at the beginning of Regex 문제: {0} This is an error message shown to the user when they write an invalid Regular Expression. {0} will be the actual text of one of the above Regular Expression errors. - - Parameter preferences - 매개 변수 기본 설정 - - \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pl.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pl.xlf index 85413a88a5fb7..f9e1e10e9e5e3 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pl.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pl.xlf @@ -57,14 +57,19 @@ Błąd podczas odczytywania zawartości pliku źródłowego „{0}”--„{1}”. - - Expression-level preferences - Preferencje na poziomie wyrażeń + + Fix all '{0}' + Fix all '{0}' + + + + Fix all '{0}' in '{1}' + Fix all '{0}' in '{1}' - - Field preferences - Preferencje pól + + Fix all '{0}' in Solution + Fix all '{0}' in Solution @@ -72,16 +77,6 @@ Wcięcia i odstępy - - Language keywords vs BCL types preferences - Słowa kluczowe języka a preferencje typów BCL - - - - Modifier preferences - Preferencje modyfikatora - - Naming rules Reguły nazewnictwa @@ -102,16 +97,6 @@ Opcje nie pochodziły z określonego rozwiązania - - Organize usings - Organizuj użycia - - - - Parentheses preferences - Preferencje dotyczące nawiasów - - Prefix '{0}' does not match expected prefix '{1}' Prefiks „{0}” jest inny niż oczekiwany prefiks „{1}” @@ -1257,6 +1242,11 @@ Pozytywne asercje wsteczne o zerowej szerokości są zwykle używane na początk Usuwanie dokumentów z konfiguracją analizatora nie jest obsługiwane. + + Supplied diagnostic cannot be null. + Supplied diagnostic cannot be null. + + Symbol "{0}" is not from source. Symbol „{0}” nie pochodzi ze źródła. @@ -1637,21 +1627,6 @@ Pozytywne asercje wsteczne o zerowej szerokości są zwykle używane na początk Dodano: - - Fix all '{0}' - Napraw wszystkie wystąpienia elementu „{0}” - - - - Fix all '{0}' in '{1}' - Napraw wszystkie wystąpienia elementu „{0}” w zakresie „{1}” - - - - Fix all '{0}' in Solution - Napraw wszystkie wystąpienia elementu „{0}” w rozwiązaniu - - After: Po: @@ -1742,11 +1717,6 @@ Pozytywne asercje wsteczne o zerowej szerokości są zwykle używane na początk Usługa typu „{0}” jest wymagana do wykonania zadania, lecz nie jest dostępna w obszarze roboczym. - - Supplied diagnostic cannot be null. - Podane informacje diagnostyczne nie mogą mieć wartości null. - - At least one diagnostic must be supplied. Należy podać co najmniej jedną informację diagnostyczną. @@ -2217,11 +2187,6 @@ Pozytywne asercje wsteczne o zerowej szerokości są zwykle używane na początk Konwencje kodowania .NET - - this. and Me. preferences - Preferencje dotyczące słów kluczowych this. i Me. - - [x-y] range in reverse order Zakres [x-y] w odwrotnej kolejności @@ -2237,11 +2202,6 @@ Pozytywne asercje wsteczne o zerowej szerokości są zwykle używane na początk Problem z wyrażeniem regularnym: {0} This is an error message shown to the user when they write an invalid Regular Expression. {0} will be the actual text of one of the above Regular Expression errors. - - Parameter preferences - Preferencje dotyczące parametrów - - \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pt-BR.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pt-BR.xlf index efba3cf52c999..c1c597c953c74 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pt-BR.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pt-BR.xlf @@ -57,14 +57,19 @@ Erro ao ler o conteúdo do arquivo de origem '{0}' – '{1}'. - - Expression-level preferences - Preferências de nível de expressão + + Fix all '{0}' + Fix all '{0}' + + + + Fix all '{0}' in '{1}' + Fix all '{0}' in '{1}' - - Field preferences - Preferências de campo + + Fix all '{0}' in Solution + Fix all '{0}' in Solution @@ -72,16 +77,6 @@ Recuo e espaçamento - - Language keywords vs BCL types preferences - Preferências de tipos BCL contra palavras-chave do idioma - - - - Modifier preferences - Preferências de modificador - - Naming rules Regras de nomenclatura @@ -102,16 +97,6 @@ As opções não vieram da Solução especificada - - Organize usings - Organizar Usos - - - - Parentheses preferences - Preferências de parênteses - - Prefix '{0}' does not match expected prefix '{1}' O prefixo '{0}' não coincide com prefixo esperado '{1}' @@ -1257,6 +1242,11 @@ As declarações de lookbehind positivas de largura zero normalmente são usadas Não há suporte para a remoção de documentos da configuração do analisador. + + Supplied diagnostic cannot be null. + Supplied diagnostic cannot be null. + + Symbol "{0}" is not from source. Símbolo "{0}" não é da fonte. @@ -1637,21 +1627,6 @@ As declarações de lookbehind positivas de largura zero normalmente são usadas Adicionado: - - Fix all '{0}' - Corrigir todos os '{0}' - - - - Fix all '{0}' in '{1}' - Corrigir todos os '{0}' em '{1}' - - - - Fix all '{0}' in Solution - Corrigir todos os '{0}' na Solução - - After: Após: @@ -1742,11 +1717,6 @@ As declarações de lookbehind positivas de largura zero normalmente são usadas O serviço do tipo '{0}' é necessário para realizar a tarefa, mas não está disponível no workspace. - - Supplied diagnostic cannot be null. - O diagnóstico fornecido não pode ser nulo. - - At least one diagnostic must be supplied. No mínimo um diagnóstico deve ser fornecido. @@ -2217,11 +2187,6 @@ As declarações de lookbehind positivas de largura zero normalmente são usadas Convenções de codificação .NET - - this. and Me. preferences - Preferências - - [x-y] range in reverse order intervalo [x-y] em ordem inversa @@ -2237,11 +2202,6 @@ As declarações de lookbehind positivas de largura zero normalmente são usadas Problema do Regex: {0} This is an error message shown to the user when they write an invalid Regular Expression. {0} will be the actual text of one of the above Regular Expression errors. - - Parameter preferences - Preferências de parâmetro - - \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ru.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ru.xlf index d611c72e4a43c..decf6dcbc7b07 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ru.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ru.xlf @@ -57,14 +57,19 @@ Ошибка при чтении содержимого исходного файла "{0}" — "{1}". - - Expression-level preferences - Выражения уровень предпочтения + + Fix all '{0}' + Fix all '{0}' + + + + Fix all '{0}' in '{1}' + Fix all '{0}' in '{1}' - - Field preferences - Предпочтения для полей + + Fix all '{0}' in Solution + Fix all '{0}' in Solution @@ -72,16 +77,6 @@ Отступы и интервалы - - Language keywords vs BCL types preferences - Параметры использования ключевых слов языка и типов BCL - - - - Modifier preferences - Предпочтения модификатора - - Naming rules Правила именования @@ -102,16 +97,6 @@ Параметры получены не из указанного решения. - - Organize usings - Упорядочение Using - - - - Parentheses preferences - Предпочтения для скобок - - Prefix '{0}' does not match expected prefix '{1}' Префикс '{0}' не соответствует ожидаемому префиксу '{1}' @@ -1257,6 +1242,11 @@ Zero-width positive lookbehind assertions are typically used at the beginning of Удаление документов конфигурации анализатора не поддерживается. + + Supplied diagnostic cannot be null. + Supplied diagnostic cannot be null. + + Symbol "{0}" is not from source. Символ "{0}" не из источника. @@ -1637,21 +1627,6 @@ Zero-width positive lookbehind assertions are typically used at the beginning of Добавлены: - - Fix all '{0}' - Исправить все "{0}" - - - - Fix all '{0}' in '{1}' - Исправить все "{0}" в "{1}" - - - - Fix all '{0}' in Solution - Исправить все "{0}" в решении - - After: После: @@ -1742,11 +1717,6 @@ Zero-width positive lookbehind assertions are typically used at the beginning of Служба типа "{0}" необходима для выполнения задачи, но она недоступна из рабочей области. - - Supplied diagnostic cannot be null. - Указанная диагностика не может быть NULL. - - At least one diagnostic must be supplied. Необходимо указать по крайней мере одну диагностику. @@ -2217,11 +2187,6 @@ Zero-width positive lookbehind assertions are typically used at the beginning of Рекомендации по написанию кода .NET - - this. and Me. preferences - Предпочтения для this. и Me. - - [x-y] range in reverse order Диапазон [x-y] в обратном порядке @@ -2237,11 +2202,6 @@ Zero-width positive lookbehind assertions are typically used at the beginning of Проблема с регулярным выражением: {0} This is an error message shown to the user when they write an invalid Regular Expression. {0} will be the actual text of one of the above Regular Expression errors. - - Parameter preferences - Настройки параметров - - \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.tr.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.tr.xlf index ca1c870db2fd7..fae37ab8b93b0 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.tr.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.tr.xlf @@ -57,14 +57,19 @@ '{0}' kaynak dosyasının içeriği okunurken hata oluştu -- '{1}'. - - Expression-level preferences - İfade düzey tercihleri + + Fix all '{0}' + Fix all '{0}' + + + + Fix all '{0}' in '{1}' + Fix all '{0}' in '{1}' - - Field preferences - Alan tercihleri + + Fix all '{0}' in Solution + Fix all '{0}' in Solution @@ -72,16 +77,6 @@ Girinti ve aralığı - - Language keywords vs BCL types preferences - Dil anahtar kelimeler vs BCL türleri tercihleri - - - - Modifier preferences - Değiştirici tercihleri - - Naming rules Adlandırma kuralları @@ -102,16 +97,6 @@ Seçenekler belirtilen Çözümden gelmedi - - Organize usings - Kullanımları Düzenle - - - - Parentheses preferences - Parantez tercihleri - - Prefix '{0}' does not match expected prefix '{1}' '{0}' öneki 'beklenen {1}' öneki eşleşmiyor @@ -1257,6 +1242,11 @@ Sıfır genişlikli pozitif geri yönlü onaylamalar genellikle normal ifadeleri Çözümleyici yapılandırma belgelerinin kaldırılması desteklenmiyor. + + Supplied diagnostic cannot be null. + Supplied diagnostic cannot be null. + + Symbol "{0}" is not from source. "{0}" sembolü kaynağa ait değil. @@ -1637,21 +1627,6 @@ Sıfır genişlikli pozitif geri yönlü onaylamalar genellikle normal ifadeleri Eklendi: - - Fix all '{0}' - Geçtiği her yerde '{0}' ifadesini düzelt - - - - Fix all '{0}' in '{1}' - {1}' içinde geçtiği her yerde '{0}' ifadesini düzelt - - - - Fix all '{0}' in Solution - Çözüm'de geçtiği her yerde '{0}' ifadesini düzelt - - After: Önce: @@ -1742,11 +1717,6 @@ Sıfır genişlikli pozitif geri yönlü onaylamalar genellikle normal ifadeleri Görevi gerçekleştirmek için '{0}' türünde hizmet gerekli, ancak bu hizmet çalışma alanında yok. - - Supplied diagnostic cannot be null. - Sağlanan tanı null olamaz. - - At least one diagnostic must be supplied. En az bir tanı sağlanmalıdır. @@ -2217,11 +2187,6 @@ Sıfır genişlikli pozitif geri yönlü onaylamalar genellikle normal ifadeleri .NET kodlama kuralları - - this. and Me. preferences - Bu. ve bana tercihleri - - [x-y] range in reverse order [x-y] aralığı ters sırada @@ -2237,11 +2202,6 @@ Sıfır genişlikli pozitif geri yönlü onaylamalar genellikle normal ifadeleri Regex sorunu: {0} This is an error message shown to the user when they write an invalid Regular Expression. {0} will be the actual text of one of the above Regular Expression errors. - - Parameter preferences - Parametre tercihleri - - \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hans.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hans.xlf index 5e9cf514c7b54..8137dc4bce876 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hans.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hans.xlf @@ -57,14 +57,19 @@ 读取源文件“{0}”中的内容时出错 -“{1}”。 - - Expression-level preferences - 表达式级首选项 + + Fix all '{0}' + Fix all '{0}' + + + + Fix all '{0}' in '{1}' + Fix all '{0}' in '{1}' - - Field preferences - 字段首选项 + + Fix all '{0}' in Solution + Fix all '{0}' in Solution @@ -72,16 +77,6 @@ 缩进和间距 - - Language keywords vs BCL types preferences - 语言关键字与 bcl 类型首选项 - - - - Modifier preferences - 修饰符首选项 - - Naming rules 命名规则 @@ -102,16 +97,6 @@ 选项并非来自指定的解决方案 - - Organize usings - 组织 Using - - - - Parentheses preferences - 括号首选项 - - Prefix '{0}' does not match expected prefix '{1}' 前缀 "{0}" 与预期前缀 "{1}" 不匹配 @@ -1257,6 +1242,11 @@ Zero-width positive lookbehind assertions are typically used at the beginning of 不支持删除分析器配置文档。 + + Supplied diagnostic cannot be null. + Supplied diagnostic cannot be null. + + Symbol "{0}" is not from source. 符号“{0}”不是来自源。 @@ -1637,21 +1627,6 @@ Zero-width positive lookbehind assertions are typically used at the beginning of 添加项: - - Fix all '{0}' - 修复所有“{0}” - - - - Fix all '{0}' in '{1}' - 修复“{1}”中的所有“{0}” - - - - Fix all '{0}' in Solution - 修复解决方案中的所有“{0}” - - After: 在此之后: @@ -1742,11 +1717,6 @@ Zero-width positive lookbehind assertions are typically used at the beginning of 完成任务需要“{0}”类型的服务,但无法从工作区中使用这样的服务。 - - Supplied diagnostic cannot be null. - 提供的诊断不能为 null。 - - At least one diagnostic must be supplied. 必须提供至少一个诊断。 @@ -2217,11 +2187,6 @@ Zero-width positive lookbehind assertions are typically used at the beginning of .NET 编码约定 - - this. and Me. preferences - this. 和 Me. 首选项 - - [x-y] range in reverse order 按相反顺序排列的 [x-y] 范围 @@ -2237,11 +2202,6 @@ Zero-width positive lookbehind assertions are typically used at the beginning of 正则表达式问题: {0} This is an error message shown to the user when they write an invalid Regular Expression. {0} will be the actual text of one of the above Regular Expression errors. - - Parameter preferences - 参数首选项 - - \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hant.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hant.xlf index 09b075198b642..e4fb7f1122d2f 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hant.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hant.xlf @@ -57,14 +57,19 @@ 讀取來源檔案 '{0}' 的內容時發生錯誤 -- '{1}'。 - - Expression-level preferences - 運算式層級喜好設定 + + Fix all '{0}' + Fix all '{0}' + + + + Fix all '{0}' in '{1}' + Fix all '{0}' in '{1}' - - Field preferences - 欄位喜好設定 + + Fix all '{0}' in Solution + Fix all '{0}' in Solution @@ -72,16 +77,6 @@ 縮排和間距 - - Language keywords vs BCL types preferences - 語言關鍵字與 BCL 類型喜好設定 - - - - Modifier preferences - 修飾元喜好設定 - - Naming rules 命名規則 @@ -102,16 +97,6 @@ 選項並非來自指定的解決方案 - - Organize usings - 組合管理 Using - - - - Parentheses preferences - 括號喜好設定 - - Prefix '{0}' does not match expected prefix '{1}' 前置詞 '{0}' 不符合預期的前置詞 '{1}' @@ -1257,6 +1242,11 @@ Zero-width positive lookbehind assertions are typically used at the beginning of 不支援移除分析器組態文件。 + + Supplied diagnostic cannot be null. + Supplied diagnostic cannot be null. + + Symbol "{0}" is not from source. 符號 "{0}" 非來自來源。 @@ -1637,21 +1627,6 @@ Zero-width positive lookbehind assertions are typically used at the beginning of 已加入: - - Fix all '{0}' - 修正所有 '{0}' - - - - Fix all '{0}' in '{1}' - 修正 '{1}' 中的所有 '{0}' - - - - Fix all '{0}' in Solution - 修正方案中的所有 '{0}' - - After: 之後: @@ -1742,11 +1717,6 @@ Zero-width positive lookbehind assertions are typically used at the beginning of 完成工作需要 '{0}' 類型的服務,但是無法從工作區取得。 - - Supplied diagnostic cannot be null. - 提供的診斷不可為 null。 - - At least one diagnostic must be supplied. 至少必須提供一項診斷。 @@ -2217,11 +2187,6 @@ Zero-width positive lookbehind assertions are typically used at the beginning of .NET 編碼慣例 - - this. and Me. preferences - this. 和 Me. 喜好設定 - - [x-y] range in reverse order 反向排序的 [x-y] 範圍 @@ -2237,11 +2202,6 @@ Zero-width positive lookbehind assertions are typically used at the beginning of Regex 問題: {0} This is an error message shown to the user when they write an invalid Regular Expression. {0} will be the actual text of one of the above Regular Expression errors. - - Parameter preferences - 參數喜好設定 - - \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CSharpCompilerExtensions.projitems b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CSharpCompilerExtensions.projitems index fffb8c36c6183..a7c14ee6595cf 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CSharpCompilerExtensions.projitems +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CSharpCompilerExtensions.projitems @@ -35,4 +35,7 @@ + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CSharpCompilerExtensionsResources.resx b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CSharpCompilerExtensionsResources.resx new file mode 100644 index 0000000000000..e4d5efbb4f352 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CSharpCompilerExtensionsResources.resx @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + var preferences + + + Expression-bodied members + + + Pattern matching preferences + + + Null-checking preferences + + + Code-block preferences + + + 'using' directive preferences + {Locked="using"} "using" is a C# keyword and should not be localized. + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CodeStyle/CSharpCodeStyleOptions.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CodeStyle/CSharpCodeStyleOptions.cs index 8c29fc9ee5505..fba1c072eb015 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CodeStyle/CSharpCodeStyleOptions.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CodeStyle/CSharpCodeStyleOptions.cs @@ -7,10 +7,19 @@ using System.Linq; using Microsoft.CodeAnalysis.AddImports; using Microsoft.CodeAnalysis.CodeStyle; + +#if CODE_STYLE +using Microsoft.CodeAnalysis.Internal.Options; + +namespace Microsoft.CodeAnalysis.CSharp.Internal.CodeStyle +{ +#else using Microsoft.CodeAnalysis.Options; namespace Microsoft.CodeAnalysis.CSharp.CodeStyle { +#endif + internal static partial class CSharpCodeStyleOptions { private static readonly ImmutableArray.Builder s_allOptionsBuilder = ImmutableArray.CreateBuilder(); @@ -330,13 +339,13 @@ public static IEnumerable>> Get internal static class CSharpCodeStyleOptionGroups { - public static readonly OptionGroup VarPreferences = new OptionGroup(CSharpWorkspaceResources.var_preferences, priority: 1); - public static readonly OptionGroup ExpressionBodiedMembers = new OptionGroup(CSharpWorkspaceResources.Expression_bodied_members, priority: 2); - public static readonly OptionGroup PatternMatching = new OptionGroup(CSharpWorkspaceResources.Pattern_matching_preferences, priority: 3); - public static readonly OptionGroup NullCheckingPreferences = new OptionGroup(CSharpWorkspaceResources.Null_checking_preferences, priority: 4); - public static readonly OptionGroup Modifier = new OptionGroup(WorkspacesResources.Modifier_preferences, priority: 5); - public static readonly OptionGroup CodeBlockPreferences = new OptionGroup(CSharpWorkspaceResources.Code_block_preferences, priority: 6); - public static readonly OptionGroup ExpressionLevelPreferences = new OptionGroup(WorkspacesResources.Expression_level_preferences, priority: 7); - public static readonly OptionGroup UsingDirectivePreferences = new OptionGroup(CSharpWorkspaceResources.using_directive_preferences, priority: 8); + public static readonly OptionGroup VarPreferences = new OptionGroup(CSharpCompilerExtensionsResources.var_preferences, priority: 1); + public static readonly OptionGroup ExpressionBodiedMembers = new OptionGroup(CSharpCompilerExtensionsResources.Expression_bodied_members, priority: 2); + public static readonly OptionGroup PatternMatching = new OptionGroup(CSharpCompilerExtensionsResources.Pattern_matching_preferences, priority: 3); + public static readonly OptionGroup NullCheckingPreferences = new OptionGroup(CSharpCompilerExtensionsResources.Null_checking_preferences, priority: 4); + public static readonly OptionGroup Modifier = new OptionGroup(CompilerExtensionsResources.Modifier_preferences, priority: 5); + public static readonly OptionGroup CodeBlockPreferences = new OptionGroup(CSharpCompilerExtensionsResources.Code_block_preferences, priority: 6); + public static readonly OptionGroup ExpressionLevelPreferences = new OptionGroup(CompilerExtensionsResources.Expression_level_preferences, priority: 7); + public static readonly OptionGroup UsingDirectivePreferences = new OptionGroup(CSharpCompilerExtensionsResources.using_directive_preferences, priority: 8); } } diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CodeStyle/CSharpCodeStyleOptions_Parsing.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CodeStyle/CSharpCodeStyleOptions_Parsing.cs index ac34ecbc48354..19b015cfd65bc 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CodeStyle/CSharpCodeStyleOptions_Parsing.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CodeStyle/CSharpCodeStyleOptions_Parsing.cs @@ -7,8 +7,14 @@ using Microsoft.CodeAnalysis.CodeStyle; using Roslyn.Utilities; +#if CODE_STYLE +using Microsoft.CodeAnalysis.Internal.Options; +namespace Microsoft.CodeAnalysis.CSharp.Internal.CodeStyle +{ +#else namespace Microsoft.CodeAnalysis.CSharp.CodeStyle { +#endif internal static partial class CSharpCodeStyleOptions { public static CodeStyleOption ParseExpressionBodyPreference( diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CodeStyle/PreferBracesPreference.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CodeStyle/PreferBracesPreference.cs index 364fe8c6aff6e..1659fcf038ecf 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CodeStyle/PreferBracesPreference.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CodeStyle/PreferBracesPreference.cs @@ -3,10 +3,17 @@ // See the LICENSE file in the project root for more information. using System.Xml.Linq; -using Microsoft.CodeAnalysis.CSharp.CodeStyle; +#if CODE_STYLE +using Microsoft.CodeAnalysis.CSharp.Internal.CodeStyle; +namespace Microsoft.CodeAnalysis.Internal.Options +{ +#else +using Microsoft.CodeAnalysis.CSharp.CodeStyle; namespace Microsoft.CodeAnalysis.CodeStyle { +#endif + /// /// Defines the known values for . /// diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CodeStyle/TypeStyle/TypeStyleHelper.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CodeStyle/TypeStyle/TypeStyleHelper.cs index 7c82dd7e7c710..57cdafb1d5abf 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CodeStyle/TypeStyle/TypeStyleHelper.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CodeStyle/TypeStyle/TypeStyleHelper.cs @@ -7,10 +7,19 @@ using System.Threading; using Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.CodeAnalysis.Options; using Microsoft.CodeAnalysis.Shared.Extensions; +#if CODE_STYLE +using OptionSet = Microsoft.CodeAnalysis.Diagnostics.AnalyzerConfigOptions; +#else +using Microsoft.CodeAnalysis.Options; +#endif + +#if CODE_STYLE +namespace Microsoft.CodeAnalysis.CSharp.Internal.CodeStyle.TypeStyle +#else namespace Microsoft.CodeAnalysis.CSharp.CodeStyle.TypeStyle +#endif { internal static class TypeStyleHelper { diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CodeStyle/TypeStyle/UseVarPreference.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CodeStyle/TypeStyle/UseVarPreference.cs index 876d1abe528f8..37f554f2a8392 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CodeStyle/TypeStyle/UseVarPreference.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CodeStyle/TypeStyle/UseVarPreference.cs @@ -4,7 +4,11 @@ using System; +#if CODE_STYLE +namespace Microsoft.CodeAnalysis.CSharp.Internal.CodeStyle.TypeStyle +#else namespace Microsoft.CodeAnalysis.CSharp.CodeStyle.TypeStyle +#endif { [Flags] internal enum UseVarPreference diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Utilities/TypeStyle/CSharpTypeStyleHelper.State.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Utilities/TypeStyle/CSharpTypeStyleHelper.State.cs index 7fea1e81d1dd9..2b3539250ac2c 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Utilities/TypeStyle/CSharpTypeStyleHelper.State.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Utilities/TypeStyle/CSharpTypeStyleHelper.State.cs @@ -3,13 +3,20 @@ // See the LICENSE file in the project root for more information. using System.Threading; -using Microsoft.CodeAnalysis.CSharp.CodeStyle; -using Microsoft.CodeAnalysis.CSharp.CodeStyle.TypeStyle; using Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.CodeAnalysis.Options; using Microsoft.CodeAnalysis.Shared.Extensions; +#if CODE_STYLE +using OptionSet = Microsoft.CodeAnalysis.Diagnostics.AnalyzerConfigOptions; +using Microsoft.CodeAnalysis.CSharp.Internal.CodeStyle; +using Microsoft.CodeAnalysis.CSharp.Internal.CodeStyle.TypeStyle; +#else +using Microsoft.CodeAnalysis.Options; +using Microsoft.CodeAnalysis.CSharp.CodeStyle; +using Microsoft.CodeAnalysis.CSharp.CodeStyle.TypeStyle; +#endif + namespace Microsoft.CodeAnalysis.CSharp.Utilities { internal partial class CSharpTypeStyleHelper diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Utilities/TypeStyle/CSharpTypeStyleHelper.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Utilities/TypeStyle/CSharpTypeStyleHelper.cs index dcb083989d6cf..2de0862f3d2c2 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Utilities/TypeStyle/CSharpTypeStyleHelper.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Utilities/TypeStyle/CSharpTypeStyleHelper.cs @@ -7,7 +7,13 @@ using System.Threading; using Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Syntax; + +#if CODE_STYLE +using OptionSet = Microsoft.CodeAnalysis.Diagnostics.AnalyzerConfigOptions; +using Microsoft.CodeAnalysis.Internal.Options; +#else using Microsoft.CodeAnalysis.Options; +#endif namespace Microsoft.CodeAnalysis.CSharp.Utilities { diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Utilities/TypeStyle/CSharpUseExplicitTypeHelper.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Utilities/TypeStyle/CSharpUseExplicitTypeHelper.cs index 29f142d69c934..7228a1a803fe1 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Utilities/TypeStyle/CSharpUseExplicitTypeHelper.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Utilities/TypeStyle/CSharpUseExplicitTypeHelper.cs @@ -4,12 +4,18 @@ using System.Threading; using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp.CodeStyle.TypeStyle; using Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.CodeAnalysis.Options; using Microsoft.CodeAnalysis.Shared.Extensions; +#if CODE_STYLE +using OptionSet = Microsoft.CodeAnalysis.Diagnostics.AnalyzerConfigOptions; +using Microsoft.CodeAnalysis.CSharp.Internal.CodeStyle.TypeStyle; +#else +using Microsoft.CodeAnalysis.Options; +using Microsoft.CodeAnalysis.CSharp.CodeStyle.TypeStyle; +#endif + namespace Microsoft.CodeAnalysis.CSharp.Utilities { internal sealed class CSharpUseExplicitTypeHelper : CSharpTypeStyleHelper diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Utilities/TypeStyle/CSharpUseImplicitTypeHelper.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Utilities/TypeStyle/CSharpUseImplicitTypeHelper.cs index 2c1a29c8707a2..97c794630d148 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Utilities/TypeStyle/CSharpUseImplicitTypeHelper.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Utilities/TypeStyle/CSharpUseImplicitTypeHelper.cs @@ -6,14 +6,20 @@ using System.Linq; using System.Threading; using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp.CodeStyle.TypeStyle; using Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.CodeAnalysis.Options; using Microsoft.CodeAnalysis.Shared.Extensions; using Microsoft.CodeAnalysis.Shared.Utilities; using Microsoft.CodeAnalysis.Simplification; +#if CODE_STYLE +using OptionSet = Microsoft.CodeAnalysis.Diagnostics.AnalyzerConfigOptions; +using Microsoft.CodeAnalysis.CSharp.Internal.CodeStyle.TypeStyle; +#else +using Microsoft.CodeAnalysis.Options; +using Microsoft.CodeAnalysis.CSharp.CodeStyle.TypeStyle; +#endif + namespace Microsoft.CodeAnalysis.CSharp.Utilities { internal sealed class CSharpUseImplicitTypeHelper : CSharpTypeStyleHelper diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.cs.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.cs.xlf new file mode 100644 index 0000000000000..840caa574801a --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.cs.xlf @@ -0,0 +1,37 @@ + + + + + + Code-block preferences + Code-block preferences + + + + Expression-bodied members + Expression-bodied members + + + + Null-checking preferences + Null-checking preferences + + + + Pattern matching preferences + Pattern matching preferences + + + + 'using' directive preferences + 'using' directive preferences + {Locked="using"} "using" is a C# keyword and should not be localized. + + + var preferences + var preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.de.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.de.xlf new file mode 100644 index 0000000000000..b9b4f50fc9b5f --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.de.xlf @@ -0,0 +1,37 @@ + + + + + + Code-block preferences + Code-block preferences + + + + Expression-bodied members + Expression-bodied members + + + + Null-checking preferences + Null-checking preferences + + + + Pattern matching preferences + Pattern matching preferences + + + + 'using' directive preferences + 'using' directive preferences + {Locked="using"} "using" is a C# keyword and should not be localized. + + + var preferences + var preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.es.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.es.xlf new file mode 100644 index 0000000000000..a843a8eae9332 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.es.xlf @@ -0,0 +1,37 @@ + + + + + + Code-block preferences + Code-block preferences + + + + Expression-bodied members + Expression-bodied members + + + + Null-checking preferences + Null-checking preferences + + + + Pattern matching preferences + Pattern matching preferences + + + + 'using' directive preferences + 'using' directive preferences + {Locked="using"} "using" is a C# keyword and should not be localized. + + + var preferences + var preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.fr.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.fr.xlf new file mode 100644 index 0000000000000..506424dcbd7c9 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.fr.xlf @@ -0,0 +1,37 @@ + + + + + + Code-block preferences + Code-block preferences + + + + Expression-bodied members + Expression-bodied members + + + + Null-checking preferences + Null-checking preferences + + + + Pattern matching preferences + Pattern matching preferences + + + + 'using' directive preferences + 'using' directive preferences + {Locked="using"} "using" is a C# keyword and should not be localized. + + + var preferences + var preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.it.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.it.xlf new file mode 100644 index 0000000000000..e1ae6acd84db1 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.it.xlf @@ -0,0 +1,37 @@ + + + + + + Code-block preferences + Code-block preferences + + + + Expression-bodied members + Expression-bodied members + + + + Null-checking preferences + Null-checking preferences + + + + Pattern matching preferences + Pattern matching preferences + + + + 'using' directive preferences + 'using' directive preferences + {Locked="using"} "using" is a C# keyword and should not be localized. + + + var preferences + var preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.ja.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.ja.xlf new file mode 100644 index 0000000000000..72d3f9fbc694c --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.ja.xlf @@ -0,0 +1,37 @@ + + + + + + Code-block preferences + Code-block preferences + + + + Expression-bodied members + Expression-bodied members + + + + Null-checking preferences + Null-checking preferences + + + + Pattern matching preferences + Pattern matching preferences + + + + 'using' directive preferences + 'using' directive preferences + {Locked="using"} "using" is a C# keyword and should not be localized. + + + var preferences + var preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.ko.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.ko.xlf new file mode 100644 index 0000000000000..02771d99b66a2 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.ko.xlf @@ -0,0 +1,37 @@ + + + + + + Code-block preferences + Code-block preferences + + + + Expression-bodied members + Expression-bodied members + + + + Null-checking preferences + Null-checking preferences + + + + Pattern matching preferences + Pattern matching preferences + + + + 'using' directive preferences + 'using' directive preferences + {Locked="using"} "using" is a C# keyword and should not be localized. + + + var preferences + var preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.pl.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.pl.xlf new file mode 100644 index 0000000000000..ddfc53e7a668c --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.pl.xlf @@ -0,0 +1,37 @@ + + + + + + Code-block preferences + Code-block preferences + + + + Expression-bodied members + Expression-bodied members + + + + Null-checking preferences + Null-checking preferences + + + + Pattern matching preferences + Pattern matching preferences + + + + 'using' directive preferences + 'using' directive preferences + {Locked="using"} "using" is a C# keyword and should not be localized. + + + var preferences + var preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.pt-BR.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.pt-BR.xlf new file mode 100644 index 0000000000000..0f8b5ca88d106 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.pt-BR.xlf @@ -0,0 +1,37 @@ + + + + + + Code-block preferences + Code-block preferences + + + + Expression-bodied members + Expression-bodied members + + + + Null-checking preferences + Null-checking preferences + + + + Pattern matching preferences + Pattern matching preferences + + + + 'using' directive preferences + 'using' directive preferences + {Locked="using"} "using" is a C# keyword and should not be localized. + + + var preferences + var preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.ru.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.ru.xlf new file mode 100644 index 0000000000000..bcfd711cc1c65 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.ru.xlf @@ -0,0 +1,37 @@ + + + + + + Code-block preferences + Code-block preferences + + + + Expression-bodied members + Expression-bodied members + + + + Null-checking preferences + Null-checking preferences + + + + Pattern matching preferences + Pattern matching preferences + + + + 'using' directive preferences + 'using' directive preferences + {Locked="using"} "using" is a C# keyword and should not be localized. + + + var preferences + var preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.tr.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.tr.xlf new file mode 100644 index 0000000000000..14dd6228f3b70 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.tr.xlf @@ -0,0 +1,37 @@ + + + + + + Code-block preferences + Code-block preferences + + + + Expression-bodied members + Expression-bodied members + + + + Null-checking preferences + Null-checking preferences + + + + Pattern matching preferences + Pattern matching preferences + + + + 'using' directive preferences + 'using' directive preferences + {Locked="using"} "using" is a C# keyword and should not be localized. + + + var preferences + var preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.zh-Hans.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.zh-Hans.xlf new file mode 100644 index 0000000000000..330916eeb7535 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.zh-Hans.xlf @@ -0,0 +1,37 @@ + + + + + + Code-block preferences + Code-block preferences + + + + Expression-bodied members + Expression-bodied members + + + + Null-checking preferences + Null-checking preferences + + + + Pattern matching preferences + Pattern matching preferences + + + + 'using' directive preferences + 'using' directive preferences + {Locked="using"} "using" is a C# keyword and should not be localized. + + + var preferences + var preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.zh-Hant.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.zh-Hant.xlf new file mode 100644 index 0000000000000..e47bbbcd7ee76 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/xlf/CSharpCompilerExtensionsResources.zh-Hant.xlf @@ -0,0 +1,37 @@ + + + + + + Code-block preferences + Code-block preferences + + + + Expression-bodied members + Expression-bodied members + + + + Null-checking preferences + Null-checking preferences + + + + Pattern matching preferences + Pattern matching preferences + + + + 'using' directive preferences + 'using' directive preferences + {Locked="using"} "using" is a C# keyword and should not be localized. + + + var preferences + var preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/AccessibilityModifiersRequired.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/AccessibilityModifiersRequired.cs index 74d8b24866f7d..6a25c279338e5 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/AccessibilityModifiersRequired.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/AccessibilityModifiersRequired.cs @@ -3,7 +3,11 @@ // See the LICENSE file in the project root for more information. +#if CODE_STYLE +namespace Microsoft.CodeAnalysis.Internal.Options +#else namespace Microsoft.CodeAnalysis.CodeStyle +#endif { internal enum AccessibilityModifiersRequired { diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/CodeStyleHelpers.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/CodeStyleHelpers.cs index 5915985e7e315..1fd89bd98c768 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/CodeStyleHelpers.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/CodeStyleHelpers.cs @@ -4,9 +4,14 @@ using System.Collections.Immutable; using System.Diagnostics; -using Microsoft.CodeAnalysis.Options; using Roslyn.Utilities; +#if CODE_STYLE +using Microsoft.CodeAnalysis.Internal.Options; +#else +using Microsoft.CodeAnalysis.Options; +#endif + namespace Microsoft.CodeAnalysis.CodeStyle { internal static class CodeStyleHelpers diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/ExpressionBodyPreference.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/ExpressionBodyPreference.cs index 2a004f7a61ded..6843bf94cb254 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/ExpressionBodyPreference.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/ExpressionBodyPreference.cs @@ -2,7 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if CODE_STYLE +namespace Microsoft.CodeAnalysis.Internal.Options +#else namespace Microsoft.CodeAnalysis.CodeStyle +#endif { /// /// Note: the order of this enum is important. We originally only supported two values, diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/OperatorPlacementWhenWrappingPreference.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/OperatorPlacementWhenWrappingPreference.cs index 21ecdb8ffd6ef..9b5b937c1f649 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/OperatorPlacementWhenWrappingPreference.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/OperatorPlacementWhenWrappingPreference.cs @@ -4,7 +4,12 @@ using System; +#if CODE_STYLE +using Microsoft.CodeAnalysis.CodeStyle; +namespace Microsoft.CodeAnalysis.Internal.Options +#else namespace Microsoft.CodeAnalysis.CodeStyle +#endif { internal enum OperatorPlacementWhenWrappingPreference { diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/ParenthesesPreference.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/ParenthesesPreference.cs index bf4329b68e49e..6970e23020272 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/ParenthesesPreference.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/ParenthesesPreference.cs @@ -2,7 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if CODE_STYLE +namespace Microsoft.CodeAnalysis.Internal.Options +#else namespace Microsoft.CodeAnalysis.CodeStyle +#endif { internal enum ParenthesesPreference { diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/UnusedParametersPreference.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/UnusedParametersPreference.cs index cd7e60efe4c66..27cd378da918d 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/UnusedParametersPreference.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/UnusedParametersPreference.cs @@ -2,7 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if CODE_STYLE +namespace Microsoft.CodeAnalysis.Internal.Options +#else namespace Microsoft.CodeAnalysis.CodeStyle +#endif { /// /// Preferences for flagging unused parameters. diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/UnusedValuePreference.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/UnusedValuePreference.cs index 2cdfec4075136..9d3e400466788 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/UnusedValuePreference.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/UnusedValuePreference.cs @@ -2,7 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if CODE_STYLE +namespace Microsoft.CodeAnalysis.Internal.Options +#else namespace Microsoft.CodeAnalysis.CodeStyle +#endif { /// /// Assignment preference for unused values from expression statements and assignments. diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CompilerExtensions.projitems b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CompilerExtensions.projitems index 9cecd17cfcc4c..69177670cbdd1 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CompilerExtensions.projitems +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CompilerExtensions.projitems @@ -307,4 +307,7 @@ + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CompilerExtensionsResources.resx b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CompilerExtensionsResources.resx new file mode 100644 index 0000000000000..bca908d76c1b8 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CompilerExtensionsResources.resx @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Organize usings + + + this. and Me. preferences + + + Language keywords vs BCL types preferences + + + Parentheses preferences + + + Modifier preferences + + + Expression-level preferences + + + Field preferences + + + Parameter preferences + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Extensions/NotificationOptionExtensions.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Extensions/NotificationOptionExtensions.cs index d1214fed96a68..fae1a025fab05 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Extensions/NotificationOptionExtensions.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Extensions/NotificationOptionExtensions.cs @@ -4,7 +4,11 @@ using Microsoft.CodeAnalysis.Diagnostics; +#if CODE_STYLE +namespace Microsoft.CodeAnalysis.Internal.Options +#else namespace Microsoft.CodeAnalysis.CodeStyle +#endif { internal static class NotificationOptionExtensions { diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Fading/FadingOptions.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Fading/FadingOptions.cs index 8c81a73ae868c..3ca3a2478baef 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Fading/FadingOptions.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Fading/FadingOptions.cs @@ -2,10 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if CODE_STYLE +using Microsoft.CodeAnalysis.Internal.Options; + +namespace Microsoft.CodeAnalysis.Internal.Fading +{ +#else using Microsoft.CodeAnalysis.Options; namespace Microsoft.CodeAnalysis.Fading { +#endif internal static class FadingOptions { public static readonly PerLanguageOption FadeOutUnusedImports = new PerLanguageOption( diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.cs.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.cs.xlf new file mode 100644 index 0000000000000..5c0793351922b --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.cs.xlf @@ -0,0 +1,47 @@ + + + + + + Expression-level preferences + Expression-level preferences + + + + Field preferences + Field preferences + + + + Language keywords vs BCL types preferences + Language keywords vs BCL types preferences + + + + Modifier preferences + Modifier preferences + + + + Organize usings + Organize usings + + + + Parameter preferences + Parameter preferences + + + + Parentheses preferences + Parentheses preferences + + + + this. and Me. preferences + this. and Me. preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.de.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.de.xlf new file mode 100644 index 0000000000000..6a64690ba2a25 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.de.xlf @@ -0,0 +1,47 @@ + + + + + + Expression-level preferences + Expression-level preferences + + + + Field preferences + Field preferences + + + + Language keywords vs BCL types preferences + Language keywords vs BCL types preferences + + + + Modifier preferences + Modifier preferences + + + + Organize usings + Organize usings + + + + Parameter preferences + Parameter preferences + + + + Parentheses preferences + Parentheses preferences + + + + this. and Me. preferences + this. and Me. preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.es.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.es.xlf new file mode 100644 index 0000000000000..df92598bc7d7b --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.es.xlf @@ -0,0 +1,47 @@ + + + + + + Expression-level preferences + Expression-level preferences + + + + Field preferences + Field preferences + + + + Language keywords vs BCL types preferences + Language keywords vs BCL types preferences + + + + Modifier preferences + Modifier preferences + + + + Organize usings + Organize usings + + + + Parameter preferences + Parameter preferences + + + + Parentheses preferences + Parentheses preferences + + + + this. and Me. preferences + this. and Me. preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.fr.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.fr.xlf new file mode 100644 index 0000000000000..7cf4d5c3a1161 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.fr.xlf @@ -0,0 +1,47 @@ + + + + + + Expression-level preferences + Expression-level preferences + + + + Field preferences + Field preferences + + + + Language keywords vs BCL types preferences + Language keywords vs BCL types preferences + + + + Modifier preferences + Modifier preferences + + + + Organize usings + Organize usings + + + + Parameter preferences + Parameter preferences + + + + Parentheses preferences + Parentheses preferences + + + + this. and Me. preferences + this. and Me. preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.it.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.it.xlf new file mode 100644 index 0000000000000..f65cfbb8927f4 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.it.xlf @@ -0,0 +1,47 @@ + + + + + + Expression-level preferences + Expression-level preferences + + + + Field preferences + Field preferences + + + + Language keywords vs BCL types preferences + Language keywords vs BCL types preferences + + + + Modifier preferences + Modifier preferences + + + + Organize usings + Organize usings + + + + Parameter preferences + Parameter preferences + + + + Parentheses preferences + Parentheses preferences + + + + this. and Me. preferences + this. and Me. preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.ja.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.ja.xlf new file mode 100644 index 0000000000000..c9fc5c89efb7b --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.ja.xlf @@ -0,0 +1,47 @@ + + + + + + Expression-level preferences + Expression-level preferences + + + + Field preferences + Field preferences + + + + Language keywords vs BCL types preferences + Language keywords vs BCL types preferences + + + + Modifier preferences + Modifier preferences + + + + Organize usings + Organize usings + + + + Parameter preferences + Parameter preferences + + + + Parentheses preferences + Parentheses preferences + + + + this. and Me. preferences + this. and Me. preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.ko.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.ko.xlf new file mode 100644 index 0000000000000..1c04fbddb7d04 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.ko.xlf @@ -0,0 +1,47 @@ + + + + + + Expression-level preferences + Expression-level preferences + + + + Field preferences + Field preferences + + + + Language keywords vs BCL types preferences + Language keywords vs BCL types preferences + + + + Modifier preferences + Modifier preferences + + + + Organize usings + Organize usings + + + + Parameter preferences + Parameter preferences + + + + Parentheses preferences + Parentheses preferences + + + + this. and Me. preferences + this. and Me. preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.pl.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.pl.xlf new file mode 100644 index 0000000000000..fa0d22c9787b2 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.pl.xlf @@ -0,0 +1,47 @@ + + + + + + Expression-level preferences + Expression-level preferences + + + + Field preferences + Field preferences + + + + Language keywords vs BCL types preferences + Language keywords vs BCL types preferences + + + + Modifier preferences + Modifier preferences + + + + Organize usings + Organize usings + + + + Parameter preferences + Parameter preferences + + + + Parentheses preferences + Parentheses preferences + + + + this. and Me. preferences + this. and Me. preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.pt-BR.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.pt-BR.xlf new file mode 100644 index 0000000000000..d92398b0510a5 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.pt-BR.xlf @@ -0,0 +1,47 @@ + + + + + + Expression-level preferences + Expression-level preferences + + + + Field preferences + Field preferences + + + + Language keywords vs BCL types preferences + Language keywords vs BCL types preferences + + + + Modifier preferences + Modifier preferences + + + + Organize usings + Organize usings + + + + Parameter preferences + Parameter preferences + + + + Parentheses preferences + Parentheses preferences + + + + this. and Me. preferences + this. and Me. preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.ru.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.ru.xlf new file mode 100644 index 0000000000000..ad6ed3d8e3cc9 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.ru.xlf @@ -0,0 +1,47 @@ + + + + + + Expression-level preferences + Expression-level preferences + + + + Field preferences + Field preferences + + + + Language keywords vs BCL types preferences + Language keywords vs BCL types preferences + + + + Modifier preferences + Modifier preferences + + + + Organize usings + Organize usings + + + + Parameter preferences + Parameter preferences + + + + Parentheses preferences + Parentheses preferences + + + + this. and Me. preferences + this. and Me. preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.tr.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.tr.xlf new file mode 100644 index 0000000000000..a276f107d8949 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.tr.xlf @@ -0,0 +1,47 @@ + + + + + + Expression-level preferences + Expression-level preferences + + + + Field preferences + Field preferences + + + + Language keywords vs BCL types preferences + Language keywords vs BCL types preferences + + + + Modifier preferences + Modifier preferences + + + + Organize usings + Organize usings + + + + Parameter preferences + Parameter preferences + + + + Parentheses preferences + Parentheses preferences + + + + this. and Me. preferences + this. and Me. preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.zh-Hans.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.zh-Hans.xlf new file mode 100644 index 0000000000000..a033b3b7653a1 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.zh-Hans.xlf @@ -0,0 +1,47 @@ + + + + + + Expression-level preferences + Expression-level preferences + + + + Field preferences + Field preferences + + + + Language keywords vs BCL types preferences + Language keywords vs BCL types preferences + + + + Modifier preferences + Modifier preferences + + + + Organize usings + Organize usings + + + + Parameter preferences + Parameter preferences + + + + Parentheses preferences + Parentheses preferences + + + + this. and Me. preferences + this. and Me. preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.zh-Hant.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.zh-Hant.xlf new file mode 100644 index 0000000000000..a0117c2cc4f86 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/xlf/CompilerExtensionsResources.zh-Hant.xlf @@ -0,0 +1,47 @@ + + + + + + Expression-level preferences + Expression-level preferences + + + + Field preferences + Field preferences + + + + Language keywords vs BCL types preferences + Language keywords vs BCL types preferences + + + + Modifier preferences + Modifier preferences + + + + Organize usings + Organize usings + + + + Parameter preferences + Parameter preferences + + + + Parentheses preferences + Parentheses preferences + + + + this. and Me. preferences + this. and Me. preferences + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/VisualBasicCompilerExtensions.projitems b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/VisualBasicCompilerExtensions.projitems index 13d2499a2cc09..6f3c067d7acd2 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/VisualBasicCompilerExtensions.projitems +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/VisualBasicCompilerExtensions.projitems @@ -15,4 +15,7 @@ + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/VisualBasicCompilerExtensionsResources.resx b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/VisualBasicCompilerExtensionsResources.resx new file mode 100644 index 0000000000000..14ed010cf9ebb --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/VisualBasicCompilerExtensionsResources.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.cs.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.cs.xlf new file mode 100644 index 0000000000000..e861c2a9743c7 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.cs.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.de.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.de.xlf new file mode 100644 index 0000000000000..0b8ef141587ad --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.de.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.es.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.es.xlf new file mode 100644 index 0000000000000..be7eb40cbcc6a --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.es.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.fr.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.fr.xlf new file mode 100644 index 0000000000000..2786f5abb593f --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.fr.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.it.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.it.xlf new file mode 100644 index 0000000000000..9c1625bef17d4 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.it.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.ja.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.ja.xlf new file mode 100644 index 0000000000000..7ce69a38361d6 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.ja.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.ko.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.ko.xlf new file mode 100644 index 0000000000000..28f5ec6d15843 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.ko.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.pl.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.pl.xlf new file mode 100644 index 0000000000000..74fd33d1db1d1 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.pl.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.pt-BR.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.pt-BR.xlf new file mode 100644 index 0000000000000..6a67c820be8e2 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.pt-BR.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.ru.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.ru.xlf new file mode 100644 index 0000000000000..557dcf343e960 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.ru.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.tr.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.tr.xlf new file mode 100644 index 0000000000000..349f8edfe77d3 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.tr.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.zh-Hans.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.zh-Hans.xlf new file mode 100644 index 0000000000000..694669fddab38 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.zh-Hans.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.zh-Hant.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.zh-Hant.xlf new file mode 100644 index 0000000000000..c4c842ae81855 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/xlf/VisualBasicCompilerExtensionsResources.zh-Hant.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/CSharpWorkspaceExtensions.projitems b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/CSharpWorkspaceExtensions.projitems index 190834d5531be..e9975c1d15589 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/CSharpWorkspaceExtensions.projitems +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/CSharpWorkspaceExtensions.projitems @@ -78,4 +78,7 @@ + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/CSharpWorkspaceExtensionsResources.resx b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/CSharpWorkspaceExtensionsResources.resx new file mode 100644 index 0000000000000..98c8b413e306f --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/CSharpWorkspaceExtensionsResources.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Expected string or char literal + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/Extensions/BlockSyntaxExtensions.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/Extensions/BlockSyntaxExtensions.cs index 1f48ca6655d08..d23e8b9b86ca2 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/Extensions/BlockSyntaxExtensions.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/Extensions/BlockSyntaxExtensions.cs @@ -2,14 +2,16 @@ // 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.Diagnostics; using System.Linq; using Microsoft.CodeAnalysis.CodeStyle; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Shared.Extensions; using Roslyn.Utilities; +#if CODE_STYLE +using Microsoft.CodeAnalysis.Internal.Options; +#endif + namespace Microsoft.CodeAnalysis.CSharp.Extensions { internal static class BlockSyntaxExtensions diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/Extensions/SyntaxTreeExtensions.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/Extensions/SyntaxTreeExtensions.cs index d89ef0814370b..7ffcb0218e973 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/Extensions/SyntaxTreeExtensions.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/Extensions/SyntaxTreeExtensions.cs @@ -381,7 +381,7 @@ private static bool AtEndOfIncompleteStringOrCharLiteral(SyntaxToken token, int { if (!token.IsKind(SyntaxKind.StringLiteralToken, SyntaxKind.CharacterLiteralToken)) { - throw new ArgumentException(Resources.Expected_string_or_char_literal, nameof(token)); + throw new ArgumentException(CSharpWorkspaceExtensionsResources.Expected_string_or_char_literal, nameof(token)); } var startLength = 1; diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.cs.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.cs.xlf new file mode 100644 index 0000000000000..f37688ced355b --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.cs.xlf @@ -0,0 +1,12 @@ + + + + + + Expected string or char literal + Expected string or char literal + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.de.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.de.xlf new file mode 100644 index 0000000000000..d3edde46bc024 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.de.xlf @@ -0,0 +1,12 @@ + + + + + + Expected string or char literal + Expected string or char literal + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.es.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.es.xlf new file mode 100644 index 0000000000000..293d2f31c9dc4 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.es.xlf @@ -0,0 +1,12 @@ + + + + + + Expected string or char literal + Expected string or char literal + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.fr.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.fr.xlf new file mode 100644 index 0000000000000..f6aa157316b24 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.fr.xlf @@ -0,0 +1,12 @@ + + + + + + Expected string or char literal + Expected string or char literal + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.it.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.it.xlf new file mode 100644 index 0000000000000..8580d0ab503e5 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.it.xlf @@ -0,0 +1,12 @@ + + + + + + Expected string or char literal + Expected string or char literal + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.ja.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.ja.xlf new file mode 100644 index 0000000000000..fdd115883dd17 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.ja.xlf @@ -0,0 +1,12 @@ + + + + + + Expected string or char literal + Expected string or char literal + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.ko.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.ko.xlf new file mode 100644 index 0000000000000..93cdb0507618c --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.ko.xlf @@ -0,0 +1,12 @@ + + + + + + Expected string or char literal + Expected string or char literal + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.pl.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.pl.xlf new file mode 100644 index 0000000000000..562e7f938e7b2 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.pl.xlf @@ -0,0 +1,12 @@ + + + + + + Expected string or char literal + Expected string or char literal + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.pt-BR.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.pt-BR.xlf new file mode 100644 index 0000000000000..b4d9d2e6aca63 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.pt-BR.xlf @@ -0,0 +1,12 @@ + + + + + + Expected string or char literal + Expected string or char literal + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.ru.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.ru.xlf new file mode 100644 index 0000000000000..207d9439daf4d --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.ru.xlf @@ -0,0 +1,12 @@ + + + + + + Expected string or char literal + Expected string or char literal + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.tr.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.tr.xlf new file mode 100644 index 0000000000000..4276f51ba0bc8 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.tr.xlf @@ -0,0 +1,12 @@ + + + + + + Expected string or char literal + Expected string or char literal + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.zh-Hans.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.zh-Hans.xlf new file mode 100644 index 0000000000000..955fe5ef65453 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.zh-Hans.xlf @@ -0,0 +1,12 @@ + + + + + + Expected string or char literal + Expected string or char literal + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.zh-Hant.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.zh-Hant.xlf new file mode 100644 index 0000000000000..585950702a808 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/CSharp/xlf/CSharpWorkspaceExtensionsResources.zh-Hant.xlf @@ -0,0 +1,12 @@ + + + + + + Expected string or char literal + Expected string or char literal + + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/Extensions/HostWorkspaceServicesExtensions.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/Extensions/HostWorkspaceServicesExtensions.cs index f9e2eef91c810..826954099b56f 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/Extensions/HostWorkspaceServicesExtensions.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/Extensions/HostWorkspaceServicesExtensions.cs @@ -23,8 +23,7 @@ public static HostLanguageServices GetExtendedLanguageServices(this HostWorkspac var languageServices = hostWorkspaceServices.GetLanguageServices(languageName); #if CODE_STYLE - // TODO: Uncomment the below once we enable language service detection in CodeStyle layer. - //languageServices = CodeStyleHostLanguageServices.GetRequiredMappedCodeStyleLanguageServices(languageServices); + languageServices = CodeStyleHostLanguageServices.GetRequiredMappedCodeStyleLanguageServices(languageServices); #endif return languageServices; } diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/Helpers/SimplificationHelpers.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/Helpers/SimplificationHelpers.cs index 14cc163aff5e6..804367e724404 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/Helpers/SimplificationHelpers.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/Helpers/SimplificationHelpers.cs @@ -3,13 +3,19 @@ // See the LICENSE file in the project root for more information. using System.Linq; -using Microsoft.CodeAnalysis.CodeStyle; -using Microsoft.CodeAnalysis.Options; using Microsoft.CodeAnalysis.Shared.Extensions; using Roslyn.Utilities; namespace Microsoft.CodeAnalysis.Simplification { +#if CODE_STYLE + using Microsoft.CodeAnalysis.Internal.Options; + using OptionSet = Diagnostics.AnalyzerConfigOptions; +#else + using Microsoft.CodeAnalysis.CodeStyle; + using Microsoft.CodeAnalysis.Options; +#endif + internal static class SimplificationHelpers { public static readonly SyntaxAnnotation DontSimplifyAnnotation = new SyntaxAnnotation(); diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/WorkspaceExtensions.projitems b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/WorkspaceExtensions.projitems index 5a131e0259d95..e3a5cfb9a5fd4 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/WorkspaceExtensions.projitems +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/WorkspaceExtensions.projitems @@ -86,4 +86,7 @@ + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/WorkspaceExtensionsResources.resx b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/WorkspaceExtensionsResources.resx new file mode 100644 index 0000000000000..14ed010cf9ebb --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/WorkspaceExtensionsResources.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.cs.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.cs.xlf new file mode 100644 index 0000000000000..e84bab9f14f74 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.cs.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.de.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.de.xlf new file mode 100644 index 0000000000000..d564284df4ee6 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.de.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.es.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.es.xlf new file mode 100644 index 0000000000000..f48a453decf3c --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.es.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.fr.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.fr.xlf new file mode 100644 index 0000000000000..3428c9e318143 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.fr.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.it.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.it.xlf new file mode 100644 index 0000000000000..846ab0e508a37 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.it.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.ja.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.ja.xlf new file mode 100644 index 0000000000000..c38f0d60a252c --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.ja.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.ko.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.ko.xlf new file mode 100644 index 0000000000000..cd7b21b945295 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.ko.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.pl.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.pl.xlf new file mode 100644 index 0000000000000..0d6dd768c9182 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.pl.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.pt-BR.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.pt-BR.xlf new file mode 100644 index 0000000000000..24b4456d434d7 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.pt-BR.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.ru.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.ru.xlf new file mode 100644 index 0000000000000..80fe469af388a --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.ru.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.tr.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.tr.xlf new file mode 100644 index 0000000000000..4c4273ed41ba9 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.tr.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.zh-Hans.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.zh-Hans.xlf new file mode 100644 index 0000000000000..c4fb3ffde5fe3 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.zh-Hans.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.zh-Hant.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.zh-Hant.xlf new file mode 100644 index 0000000000000..39b1ddf3ede83 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/xlf/WorkspaceExtensionsResources.zh-Hant.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/Extensions/ContextQuery/VisualBasicSyntaxContext.vb b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/Extensions/ContextQuery/VisualBasicSyntaxContext.vb index 507b77434c0e4..174861af4f9ad 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/Extensions/ContextQuery/VisualBasicSyntaxContext.vb +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/Extensions/ContextQuery/VisualBasicSyntaxContext.vb @@ -7,6 +7,7 @@ Imports Microsoft.CodeAnalysis.LanguageServices Imports Microsoft.CodeAnalysis.Shared.Extensions.ContextQuery Imports Microsoft.CodeAnalysis.VisualBasic.Syntax Imports Microsoft.CodeAnalysis.VisualBasic.Utilities +Imports Roslyn.Utilities Namespace Microsoft.CodeAnalysis.VisualBasic.Extensions.ContextQuery ''' diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/VisualBasicWorkspaceExtensions.projitems b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/VisualBasicWorkspaceExtensions.projitems index c2a2451ff3587..bc06010f47eae 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/VisualBasicWorkspaceExtensions.projitems +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/VisualBasicWorkspaceExtensions.projitems @@ -86,4 +86,7 @@ + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/VisualBasicWorkspaceExtensionsResources.resx b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/VisualBasicWorkspaceExtensionsResources.resx new file mode 100644 index 0000000000000..14ed010cf9ebb --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/VisualBasicWorkspaceExtensionsResources.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.cs.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.cs.xlf new file mode 100644 index 0000000000000..b3e07b4269548 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.cs.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.de.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.de.xlf new file mode 100644 index 0000000000000..bf424db27a3ca --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.de.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.es.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.es.xlf new file mode 100644 index 0000000000000..07d1946c8d89b --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.es.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.fr.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.fr.xlf new file mode 100644 index 0000000000000..32ca3e5240be0 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.fr.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.it.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.it.xlf new file mode 100644 index 0000000000000..d9820d5714245 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.it.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.ja.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.ja.xlf new file mode 100644 index 0000000000000..a15a700fe4aba --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.ja.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.ko.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.ko.xlf new file mode 100644 index 0000000000000..4ddb966c5597b --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.ko.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.pl.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.pl.xlf new file mode 100644 index 0000000000000..dfe0a59d4e67b --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.pl.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.pt-BR.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.pt-BR.xlf new file mode 100644 index 0000000000000..9df7a49298777 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.pt-BR.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.ru.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.ru.xlf new file mode 100644 index 0000000000000..7ecc3a2f20862 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.ru.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.tr.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.tr.xlf new file mode 100644 index 0000000000000..428070411396b --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.tr.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.zh-Hans.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.zh-Hans.xlf new file mode 100644 index 0000000000000..523683b18b013 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.zh-Hans.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.zh-Hant.xlf b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.zh-Hant.xlf new file mode 100644 index 0000000000000..d9e90c0ce72f3 --- /dev/null +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/VisualBasic/xlf/VisualBasicWorkspaceExtensionsResources.zh-Hant.xlf @@ -0,0 +1,12 @@ + + + + + + Remove this value when another is added. + Remove this value when another is added. + https://github.com/Microsoft/msbuild/issues/1661 + + + + \ No newline at end of file diff --git a/src/Workspaces/VisualBasic/Portable/CodeStyle/VisualBasicCodeStyleOptions.vb b/src/Workspaces/VisualBasic/Portable/CodeStyle/VisualBasicCodeStyleOptions.vb index 1a80daff06074..5c5691b6b4575 100644 --- a/src/Workspaces/VisualBasic/Portable/CodeStyle/VisualBasicCodeStyleOptions.vb +++ b/src/Workspaces/VisualBasic/Portable/CodeStyle/VisualBasicCodeStyleOptions.vb @@ -56,7 +56,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.CodeStyle End Class Friend NotInheritable Class VisualBasicCodeStyleOptionGroups - Public Shared ReadOnly Modifier As New OptionGroup(WorkspacesResources.Modifier_preferences, priority:=1) - Public Shared ReadOnly ExpressionLevelPreferences As New OptionGroup(WorkspacesResources.Expression_level_preferences, priority:=2) + Public Shared ReadOnly Modifier As New OptionGroup(CompilerExtensionsResources.Modifier_preferences, priority:=1) + Public Shared ReadOnly ExpressionLevelPreferences As New OptionGroup(CompilerExtensionsResources.Expression_level_preferences, priority:=2) End Class End Namespace diff --git a/src/Workspaces/VisualBasic/Portable/Microsoft.CodeAnalysis.VisualBasic.Workspaces.vbproj b/src/Workspaces/VisualBasic/Portable/Microsoft.CodeAnalysis.VisualBasic.Workspaces.vbproj index fc7287b21bfb8..9deadc9d3833c 100644 --- a/src/Workspaces/VisualBasic/Portable/Microsoft.CodeAnalysis.VisualBasic.Workspaces.vbproj +++ b/src/Workspaces/VisualBasic/Portable/Microsoft.CodeAnalysis.VisualBasic.Workspaces.vbproj @@ -38,6 +38,7 @@ +