diff --git a/src/Features/CSharp/Portable/AssignOutParameters/AssignOutParametersAboveReturnCodeFixProvider.cs b/src/Features/CSharp/Portable/AssignOutParameters/AssignOutParametersAboveReturnCodeFixProvider.cs index 8aa0876cf059202d1b0ef6a223595754216f62aa..1e3c150d94bf3a813436f9198c8420e35855243d 100644 --- a/src/Features/CSharp/Portable/AssignOutParameters/AssignOutParametersAboveReturnCodeFixProvider.cs +++ b/src/Features/CSharp/Portable/AssignOutParameters/AssignOutParametersAboveReturnCodeFixProvider.cs @@ -16,6 +16,11 @@ namespace Microsoft.CodeAnalysis.CSharp.AssignOutParameters [ExportCodeFixProvider(LanguageNames.CSharp), Shared] internal class AssignOutParametersAboveReturnCodeFixProvider : AbstractAssignOutParametersCodeFixProvider { + [ImportingConstructor] + public AssignOutParametersAboveReturnCodeFixProvider() + { + } + protected override void TryRegisterFix(CodeFixContext context, Document document, SyntaxNode container, SyntaxNode location) { context.RegisterCodeFix(new MyCodeAction( diff --git a/src/Features/CSharp/Portable/AssignOutParameters/AssignOutParametersAtStartCodeFixProvider.cs b/src/Features/CSharp/Portable/AssignOutParameters/AssignOutParametersAtStartCodeFixProvider.cs index 87ec0ac59c523eb0272e98ec336e3d93194b1eaf..fc4a6c5c2ac7318e2ac8fa79d0cc440a7325acca 100644 --- a/src/Features/CSharp/Portable/AssignOutParameters/AssignOutParametersAtStartCodeFixProvider.cs +++ b/src/Features/CSharp/Portable/AssignOutParameters/AssignOutParametersAtStartCodeFixProvider.cs @@ -14,6 +14,11 @@ namespace Microsoft.CodeAnalysis.CSharp.AssignOutParameters [ExportCodeFixProvider(LanguageNames.CSharp), Shared] internal class AssignOutParametersAtStartCodeFixProvider : AbstractAssignOutParametersCodeFixProvider { + [ImportingConstructor] + public AssignOutParametersAtStartCodeFixProvider() + { + } + protected override void TryRegisterFix(CodeFixContext context, Document document, SyntaxNode container, SyntaxNode location) { // Don't offer if we're already the starting statement of the container. This case will diff --git a/src/Features/CSharp/Portable/CodeRefactorings/CSharpRefactoringHelpersService.cs b/src/Features/CSharp/Portable/CodeRefactorings/CSharpRefactoringHelpersService.cs index 01190a8a1e12f0d62822fbf11bd64e6ece2d4acf..9ff12a85735c57a5ab646f506a28cf952359d860 100644 --- a/src/Features/CSharp/Portable/CodeRefactorings/CSharpRefactoringHelpersService.cs +++ b/src/Features/CSharp/Portable/CodeRefactorings/CSharpRefactoringHelpersService.cs @@ -14,6 +14,11 @@ namespace Microsoft.CodeAnalysis.CSharp.CodeRefactorings [ExportLanguageService(typeof(IRefactoringHelpersService), LanguageNames.CSharp), Shared] internal class CSharpRefactoringHelpersService : AbstractRefactoringHelpersService { + [ImportingConstructor] + public CSharpRefactoringHelpersService() + { + } + protected override IEnumerable ExtractNodesSimple(SyntaxNode? node, ISyntaxFactsService syntaxFacts) { if (node == null) diff --git a/src/Features/CSharp/Portable/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionCodeFixProvider.cs b/src/Features/CSharp/Portable/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionCodeFixProvider.cs index a0cf5248df18e146c54ce05ed9fa72faa414a1ca..2304bfc1625565377db93e8d23ed7bd8fe080c1f 100644 --- a/src/Features/CSharp/Portable/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionCodeFixProvider.cs +++ b/src/Features/CSharp/Portable/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionCodeFixProvider.cs @@ -25,6 +25,11 @@ namespace Microsoft.CodeAnalysis.CSharp.ConvertSwitchStatementToExpression [ExportCodeFixProvider(LanguageNames.CSharp), Shared] internal sealed partial class ConvertSwitchStatementToExpressionCodeFixProvider : SyntaxEditorBasedCodeFixProvider { + [ImportingConstructor] + public ConvertSwitchStatementToExpressionCodeFixProvider() + { + } + public override ImmutableArray FixableDiagnosticIds => ImmutableArray.Create(IDEDiagnosticIds.ConvertSwitchStatementToExpressionDiagnosticId); diff --git a/src/Features/CSharp/Portable/ImplementInterface/CSharpImplementExplicitlyCodeRefactoringProvider.cs b/src/Features/CSharp/Portable/ImplementInterface/CSharpImplementExplicitlyCodeRefactoringProvider.cs index af4db80e335af84806e5e3a16139fe556d1428c8..acb2d81c0bb9ecb89beea6b39189d08d258e196a 100644 --- a/src/Features/CSharp/Portable/ImplementInterface/CSharpImplementExplicitlyCodeRefactoringProvider.cs +++ b/src/Features/CSharp/Portable/ImplementInterface/CSharpImplementExplicitlyCodeRefactoringProvider.cs @@ -24,6 +24,11 @@ namespace Microsoft.CodeAnalysis.CSharp.ImplementInterface internal class CSharpImplementExplicitlyCodeRefactoringProvider : AbstractChangeImplementionCodeRefactoringProvider { + [ImportingConstructor] + public CSharpImplementExplicitlyCodeRefactoringProvider() + { + } + protected override string Implement_0 => FeaturesResources.Implement_0_explicitly; protected override string Implement_all_interfaces => FeaturesResources.Implement_all_interfaces_explicitly; protected override string Implement => FeaturesResources.Implement_explicitly; diff --git a/src/Features/CSharp/Portable/ImplementInterface/CSharpImplementImplicitlyCodeRefactoringProvider.cs b/src/Features/CSharp/Portable/ImplementInterface/CSharpImplementImplicitlyCodeRefactoringProvider.cs index bb9d5cee1790355fd02cbb6b859e618a0effe794..c1120c2c000076e057fcee8281e8f2ee23d521c2 100644 --- a/src/Features/CSharp/Portable/ImplementInterface/CSharpImplementImplicitlyCodeRefactoringProvider.cs +++ b/src/Features/CSharp/Portable/ImplementInterface/CSharpImplementImplicitlyCodeRefactoringProvider.cs @@ -18,6 +18,11 @@ namespace Microsoft.CodeAnalysis.CSharp.ImplementInterface internal class CSharpImplementImplicitlyCodeRefactoringProvider : AbstractChangeImplementionCodeRefactoringProvider { + [ImportingConstructor] + public CSharpImplementImplicitlyCodeRefactoringProvider() + { + } + protected override string Implement_0 => FeaturesResources.Implement_0_implicitly; protected override string Implement_all_interfaces => FeaturesResources.Implement_all_interfaces_implicitly; protected override string Implement => FeaturesResources.Implement_implicitly; diff --git a/src/Features/CSharp/Portable/IntroduceVariable/CSharpIntroduceLocalForExpressionCodeRefactoringProvider.cs b/src/Features/CSharp/Portable/IntroduceVariable/CSharpIntroduceLocalForExpressionCodeRefactoringProvider.cs index 72f2fa6c08615da5150748175c27d7236fab8544..9c947ea478c1507bb5f048abf0578914d0fc305b 100644 --- a/src/Features/CSharp/Portable/IntroduceVariable/CSharpIntroduceLocalForExpressionCodeRefactoringProvider.cs +++ b/src/Features/CSharp/Portable/IntroduceVariable/CSharpIntroduceLocalForExpressionCodeRefactoringProvider.cs @@ -16,6 +16,11 @@ internal class CSharpIntroduceLocalForExpressionCodeRefactoringProvider : ExpressionStatementSyntax, LocalDeclarationStatementSyntax> { + [ImportingConstructor] + public CSharpIntroduceLocalForExpressionCodeRefactoringProvider() + { + } + protected override bool IsValid(ExpressionStatementSyntax expressionStatement, TextSpan span) { // Expression is likely too simple to want to offer to generate a local for. diff --git a/src/Features/CSharp/Portable/MakeLocalFunctionStatic/MakeLocalFunctionStaticCodeRefactoringProvider.cs b/src/Features/CSharp/Portable/MakeLocalFunctionStatic/MakeLocalFunctionStaticCodeRefactoringProvider.cs index faa66d268a0237dea273ffd4d84a392f931e99b5..cac34c66181e8dd25159f15ac68c8692a7a925f3 100644 --- a/src/Features/CSharp/Portable/MakeLocalFunctionStatic/MakeLocalFunctionStaticCodeRefactoringProvider.cs +++ b/src/Features/CSharp/Portable/MakeLocalFunctionStatic/MakeLocalFunctionStaticCodeRefactoringProvider.cs @@ -15,6 +15,11 @@ namespace Microsoft.CodeAnalysis.CSharp.MakeLocalFunctionStatic [ExportCodeRefactoringProvider(LanguageNames.CSharp, Name = nameof(MakeLocalFunctionStaticCodeRefactoringProvider)), Shared] internal sealed class MakeLocalFunctionStaticCodeRefactoringProvider : CodeRefactoringProvider { + [ImportingConstructor] + public MakeLocalFunctionStaticCodeRefactoringProvider() + { + } + public override async Task ComputeRefactoringsAsync(CodeRefactoringContext context) { var (document, textSpan, cancellationToken) = context; diff --git a/src/Features/CSharp/Portable/MakeLocalFunctionStatic/PassInCapturedVariablesAsArgumentsCodeFixProvider.cs b/src/Features/CSharp/Portable/MakeLocalFunctionStatic/PassInCapturedVariablesAsArgumentsCodeFixProvider.cs index 6ec2dfcffb8ebbf6731c2a2f8daf751d07a8dff1..853ccf88d467a5a946b9a5b7e90f14b29e82d06e 100644 --- a/src/Features/CSharp/Portable/MakeLocalFunctionStatic/PassInCapturedVariablesAsArgumentsCodeFixProvider.cs +++ b/src/Features/CSharp/Portable/MakeLocalFunctionStatic/PassInCapturedVariablesAsArgumentsCodeFixProvider.cs @@ -19,6 +19,11 @@ namespace Microsoft.CodeAnalysis.CSharp.MakeLocalFunctionStatic [ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(PassInCapturedVariablesAsArgumentsCodeFixProvider)), Shared] internal sealed class PassInCapturedVariablesAsArgumentsCodeFixProvider : SyntaxEditorBasedCodeFixProvider { + [ImportingConstructor] + public PassInCapturedVariablesAsArgumentsCodeFixProvider() + { + } + // "CS8421: A static local function can't contain a reference to ." public override ImmutableArray FixableDiagnosticIds => ImmutableArray.Create("CS8421"); diff --git a/src/Features/CSharp/Portable/MakeMemberStatic/CSharpMakeMemberStaticCodeFixProvider.cs b/src/Features/CSharp/Portable/MakeMemberStatic/CSharpMakeMemberStaticCodeFixProvider.cs index 38388407ad1ce40e76c5c1e0ae42926a81e08a8b..4b4e4052697bbf2014e964cbb83b3a2d2ec6ba46 100644 --- a/src/Features/CSharp/Portable/MakeMemberStatic/CSharpMakeMemberStaticCodeFixProvider.cs +++ b/src/Features/CSharp/Portable/MakeMemberStatic/CSharpMakeMemberStaticCodeFixProvider.cs @@ -12,6 +12,11 @@ namespace Microsoft.CodeAnalysis.CSharp.MakeMemberStatic [ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(CSharpMakeMemberStaticCodeFixProvider)), Shared] internal sealed class CSharpMakeMemberStaticCodeFixProvider : AbstractMakeMemberStaticCodeFixProvider { + [ImportingConstructor] + public CSharpMakeMemberStaticCodeFixProvider() + { + } + public override ImmutableArray FixableDiagnosticIds { get; } = ImmutableArray.Create( "CS0708" // 'MyMethod': cannot declare instance members in a static class diff --git a/src/Features/CSharp/Portable/MoveDeclarationNearReference/CSharpMoveDeclarationNearReferenceCodeRefactoringProvider.cs b/src/Features/CSharp/Portable/MoveDeclarationNearReference/CSharpMoveDeclarationNearReferenceCodeRefactoringProvider.cs index 55fe9483ad61476ddbc85e4093e9a4de638e2be4..472a1e19e5778f087c76744968ddb824ae2e60a8 100644 --- a/src/Features/CSharp/Portable/MoveDeclarationNearReference/CSharpMoveDeclarationNearReferenceCodeRefactoringProvider.cs +++ b/src/Features/CSharp/Portable/MoveDeclarationNearReference/CSharpMoveDeclarationNearReferenceCodeRefactoringProvider.cs @@ -11,5 +11,9 @@ namespace Microsoft.CodeAnalysis.CSharp.MoveDeclarationNearReference [ExtensionOrder(After = PredefinedCodeRefactoringProviderNames.InlineTemporary)] class CSharpMoveDeclarationNearReferenceCodeRefactoringProvider : AbstractMoveDeclarationNearReferenceCodeRefactoringProvider { + [ImportingConstructor] + public CSharpMoveDeclarationNearReferenceCodeRefactoringProvider() + { + } } } diff --git a/src/Features/CSharp/Portable/PopulateSwitch/CSharpPopulateSwitchExpressionCodeFixProvider.cs b/src/Features/CSharp/Portable/PopulateSwitch/CSharpPopulateSwitchExpressionCodeFixProvider.cs index 6990f511a9294f9bbe505d28c8128d8d81fd6f90..f66b3188040afb61df6ac9cbd1888af2f35a9f56 100644 --- a/src/Features/CSharp/Portable/PopulateSwitch/CSharpPopulateSwitchExpressionCodeFixProvider.cs +++ b/src/Features/CSharp/Portable/PopulateSwitch/CSharpPopulateSwitchExpressionCodeFixProvider.cs @@ -24,6 +24,11 @@ internal class CSharpPopulateSwitchExpressionCodeFixProvider SwitchExpressionArmSyntax, MemberAccessExpressionSyntax> { + [ImportingConstructor] + public CSharpPopulateSwitchExpressionCodeFixProvider() + { + } + protected override SwitchExpressionArmSyntax CreateDefaultSwitchArm(SyntaxGenerator generator, Compilation compilation) => SwitchExpressionArm(DiscardPattern(), Exception(generator, compilation)); diff --git a/src/Features/CSharp/Portable/PopulateSwitch/CSharpPopulateSwitchStatementCodeFixProvider.cs b/src/Features/CSharp/Portable/PopulateSwitch/CSharpPopulateSwitchStatementCodeFixProvider.cs index 71ac530f0df998220d9c329053f057879437691f..b217eac1efa3e8e44856f32c84dda6174cbb8b1a 100644 --- a/src/Features/CSharp/Portable/PopulateSwitch/CSharpPopulateSwitchStatementCodeFixProvider.cs +++ b/src/Features/CSharp/Portable/PopulateSwitch/CSharpPopulateSwitchStatementCodeFixProvider.cs @@ -15,5 +15,9 @@ namespace Microsoft.CodeAnalysis.CSharp.PopulateSwitch internal class CSharpPopulateSwitchStatementCodeFixProvider : AbstractPopulateSwitchStatementCodeFixProvider< SwitchStatementSyntax, SwitchSectionSyntax, MemberAccessExpressionSyntax> { + [ImportingConstructor] + public CSharpPopulateSwitchStatementCodeFixProvider() + { + } } } diff --git a/src/Features/CSharp/Portable/ReverseForStatement/CSharpReverseForStatementCodeRefactoringProvider.cs b/src/Features/CSharp/Portable/ReverseForStatement/CSharpReverseForStatementCodeRefactoringProvider.cs index f2b228f5d17fcb959c8427995a6a0ddca43d79dd..ee2203b5af20adf02bc6b02a5492efefcdcc99ae 100644 --- a/src/Features/CSharp/Portable/ReverseForStatement/CSharpReverseForStatementCodeRefactoringProvider.cs +++ b/src/Features/CSharp/Portable/ReverseForStatement/CSharpReverseForStatementCodeRefactoringProvider.cs @@ -24,6 +24,11 @@ namespace Microsoft.CodeAnalysis.CSharp.ReverseForStatement [ExportCodeRefactoringProvider(LanguageNames.CSharp), Shared] internal class CSharpReverseForStatementCodeRefactoringProvider : CodeRefactoringProvider { + [ImportingConstructor] + public CSharpReverseForStatementCodeRefactoringProvider() + { + } + public override async Task ComputeRefactoringsAsync(CodeRefactoringContext context) { var forStatement = await context.TryGetRelevantNodeAsync().ConfigureAwait(false); diff --git a/src/Features/CSharp/Portable/SignatureHelp/InitializerExpressionSignatureHelpProvider.cs b/src/Features/CSharp/Portable/SignatureHelp/InitializerExpressionSignatureHelpProvider.cs index 47629903ac14d062eefeefd21a77f3c33d9289e9..010eb7d220884554539e82e2353c80f4566b9d89 100644 --- a/src/Features/CSharp/Portable/SignatureHelp/InitializerExpressionSignatureHelpProvider.cs +++ b/src/Features/CSharp/Portable/SignatureHelp/InitializerExpressionSignatureHelpProvider.cs @@ -15,6 +15,11 @@ namespace Microsoft.CodeAnalysis.CSharp.SignatureHelp [ExportSignatureHelpProvider(nameof(InitializerExpressionSignatureHelpProvider), LanguageNames.CSharp), Shared] internal partial class InitializerExpressionSignatureHelpProvider : AbstractOrdinaryMethodSignatureHelpProvider { + [ImportingConstructor] + public InitializerExpressionSignatureHelpProvider() + { + } + public override bool IsTriggerCharacter(char ch) => ch == '{' || ch == ','; diff --git a/src/Features/CSharp/Portable/SimplifyInterpolation/CSharpSimplifyInterpolationCodeFixProvider.cs b/src/Features/CSharp/Portable/SimplifyInterpolation/CSharpSimplifyInterpolationCodeFixProvider.cs index b915a1c55163a6dc07c70ce9c0d0cac4c95dd048..d4f9ad451fa26f800bee46b0cec48203baa97577 100644 --- a/src/Features/CSharp/Portable/SimplifyInterpolation/CSharpSimplifyInterpolationCodeFixProvider.cs +++ b/src/Features/CSharp/Portable/SimplifyInterpolation/CSharpSimplifyInterpolationCodeFixProvider.cs @@ -13,6 +13,11 @@ internal class CSharpSimplifyInterpolationCodeFixProvider : AbstractSimplifyInte InterpolationSyntax, ExpressionSyntax, InterpolationAlignmentClauseSyntax, InterpolationFormatClauseSyntax, InterpolatedStringExpressionSyntax> { + [ImportingConstructor] + public CSharpSimplifyInterpolationCodeFixProvider() + { + } + protected override InterpolationSyntax WithExpression(InterpolationSyntax interpolation, ExpressionSyntax expression) => interpolation.WithExpression(expression); diff --git a/src/Features/CSharp/Portable/UseExpressionBodyForLambda/UseExpressionBodyForLambdaCodeStyleProvider.cs b/src/Features/CSharp/Portable/UseExpressionBodyForLambda/UseExpressionBodyForLambdaCodeStyleProvider.cs index 5ee0db0e412a805d532cb802e2dc641504b4e77e..3c4885880252724a7c16f4f9925743f8b79759bb 100644 --- a/src/Features/CSharp/Portable/UseExpressionBodyForLambda/UseExpressionBodyForLambdaCodeStyleProvider.cs +++ b/src/Features/CSharp/Portable/UseExpressionBodyForLambda/UseExpressionBodyForLambdaCodeStyleProvider.cs @@ -227,11 +227,19 @@ public MyCodeAction(string title, Func> create [ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(UseExpressionBodyForLambdaCodeFixProvider)), Shared] internal sealed class UseExpressionBodyForLambdaCodeFixProvider : UseExpressionBodyForLambdaCodeStyleProvider.CodeFixProvider { + [ImportingConstructor] + public UseExpressionBodyForLambdaCodeFixProvider() + { + } } [ExportCodeRefactoringProvider(LanguageNames.CSharp, Name = nameof(UseExpressionBodyForLambdaCodeRefactoringProvider)), Shared] internal sealed class UseExpressionBodyForLambdaCodeRefactoringProvider : UseExpressionBodyForLambdaCodeStyleProvider.CodeRefactoringProvider { + [ImportingConstructor] + public UseExpressionBodyForLambdaCodeRefactoringProvider() + { + } } [DiagnosticAnalyzer(LanguageNames.CSharp)] diff --git a/src/Features/Core/Portable/CodeFixes/Configuration/ConfigureCodeStyle/ConfigureCodeStyleOptionCodeFixProvider.cs b/src/Features/Core/Portable/CodeFixes/Configuration/ConfigureCodeStyle/ConfigureCodeStyleOptionCodeFixProvider.cs index 98e5a5bfabb46e3d7ef059017c4b8e63ecf0a414..84b2a453acfd8c83ed15db0dd49092cb30220cea 100644 --- a/src/Features/Core/Portable/CodeFixes/Configuration/ConfigureCodeStyle/ConfigureCodeStyleOptionCodeFixProvider.cs +++ b/src/Features/Core/Portable/CodeFixes/Configuration/ConfigureCodeStyle/ConfigureCodeStyleOptionCodeFixProvider.cs @@ -27,6 +27,11 @@ internal sealed partial class ConfigureCodeStyleOptionCodeFixProvider : IConfigu { private static readonly ImmutableArray s_boolValues = ImmutableArray.Create(true, false); + [ImportingConstructor] + public ConfigureCodeStyleOptionCodeFixProvider() + { + } + public bool IsFixableDiagnostic(Diagnostic diagnostic) { // We only offer fix for configurable code style diagnostics which have one of more editorconfig based storage locations. diff --git a/src/Features/Core/Portable/CodeFixes/Configuration/ConfigureSeverity/ConfigureSeverityLevelCodeFixProvider.cs b/src/Features/Core/Portable/CodeFixes/Configuration/ConfigureSeverity/ConfigureSeverityLevelCodeFixProvider.cs index 4ea6b9da58eb9d389a165c0fd02a82b1ca4bfb83..7ff584f848497d818574ef933c1a62ab02afb729 100644 --- a/src/Features/Core/Portable/CodeFixes/Configuration/ConfigureSeverity/ConfigureSeverityLevelCodeFixProvider.cs +++ b/src/Features/Core/Portable/CodeFixes/Configuration/ConfigureSeverity/ConfigureSeverityLevelCodeFixProvider.cs @@ -26,6 +26,11 @@ internal sealed partial class ConfigureSeverityLevelCodeFixProvider : IConfigura (nameof(EditorConfigSeverityStrings.Warning), EditorConfigSeverityStrings.Warning), (nameof(EditorConfigSeverityStrings.Error), EditorConfigSeverityStrings.Error)); + [ImportingConstructor] + public ConfigureSeverityLevelCodeFixProvider() + { + } + // We only offer fix for configurable diagnostics. // Also skip suppressed diagnostics defensively, though the code fix engine should ideally never call us for suppressed diagnostics. public bool IsFixableDiagnostic(Diagnostic diagnostic) diff --git a/src/Features/Core/Portable/Completion/Providers/ImportCompletionProvider/AbstractTypeImportCompletionService.CacheEntry.cs b/src/Features/Core/Portable/Completion/Providers/ImportCompletionProvider/AbstractTypeImportCompletionService.CacheEntry.cs index a6170b765d616489bd66eafcb3a89fd8833f66be..da68130b6796ff8fc6ce69f2b19a7dbb7f1bb867 100644 --- a/src/Features/Core/Portable/Completion/Providers/ImportCompletionProvider/AbstractTypeImportCompletionService.CacheEntry.cs +++ b/src/Features/Core/Portable/Completion/Providers/ImportCompletionProvider/AbstractTypeImportCompletionService.CacheEntry.cs @@ -141,6 +141,10 @@ public void Dispose() [ExportWorkspaceServiceFactory(typeof(IImportCompletionCacheService), ServiceLayer.Editor), Shared] private sealed class CacheServiceFactory : AbstractImportCompletionCacheServiceFactory { + [ImportingConstructor] + public CacheServiceFactory() + { + } } } } diff --git a/src/Features/Core/Portable/Completion/Providers/ImportCompletionProvider/ExtensionMethodImportCompletionHelper.CacheEntry.cs b/src/Features/Core/Portable/Completion/Providers/ImportCompletionProvider/ExtensionMethodImportCompletionHelper.CacheEntry.cs index eba893a7155591d57ef53f9e241f8e7ac4dcf93c..892ef49bab5dd9a8538fcdc6b22a19fca46ec1c2 100644 --- a/src/Features/Core/Portable/Completion/Providers/ImportCompletionProvider/ExtensionMethodImportCompletionHelper.CacheEntry.cs +++ b/src/Features/Core/Portable/Completion/Providers/ImportCompletionProvider/ExtensionMethodImportCompletionHelper.CacheEntry.cs @@ -97,6 +97,10 @@ public void Dispose() [ExportWorkspaceServiceFactory(typeof(IImportCompletionCacheService), ServiceLayer.Editor), Shared] private sealed class CacheServiceFactory : AbstractImportCompletionCacheServiceFactory { + [ImportingConstructor] + public CacheServiceFactory() + { + } } private static IImportCompletionCacheService GetCacheService(Workspace workspace) diff --git a/src/Features/Core/Portable/SolutionCrawler/HostSolutionCrawlerWorkspaceEventListener.cs b/src/Features/Core/Portable/SolutionCrawler/HostSolutionCrawlerWorkspaceEventListener.cs index e9d611cf75dcb477acf1deee2862c22ee69a6886..7c99493e8117d7a48ba0b0d1922cb619ecc794c8 100644 --- a/src/Features/Core/Portable/SolutionCrawler/HostSolutionCrawlerWorkspaceEventListener.cs +++ b/src/Features/Core/Portable/SolutionCrawler/HostSolutionCrawlerWorkspaceEventListener.cs @@ -8,6 +8,11 @@ namespace Microsoft.CodeAnalysis.SolutionCrawler [ExportEventListener(WellKnownEventListeners.Workspace, WorkspaceKind.Host), Shared] internal class HostSolutionCrawlerWorkspaceEventListener : IEventListener, IEventListenerStoppable { + [ImportingConstructor] + public HostSolutionCrawlerWorkspaceEventListener() + { + } + public void StartListening(Workspace workspace, object serviceOpt) { var registration = workspace.Services.GetService(); diff --git a/src/Features/Core/Portable/SolutionCrawler/MiscSolutionCrawlerWorkspaceEventListener.cs b/src/Features/Core/Portable/SolutionCrawler/MiscSolutionCrawlerWorkspaceEventListener.cs index 311e1e15e61fd497738ea9ace6b951a9da5e785a..86b9f21868536482ff641be52ae4819db8a23871 100644 --- a/src/Features/Core/Portable/SolutionCrawler/MiscSolutionCrawlerWorkspaceEventListener.cs +++ b/src/Features/Core/Portable/SolutionCrawler/MiscSolutionCrawlerWorkspaceEventListener.cs @@ -9,6 +9,11 @@ namespace Microsoft.CodeAnalysis.SolutionCrawler [ExportEventListener(WellKnownEventListeners.Workspace, WorkspaceKind.MiscellaneousFiles), Shared] internal class MiscSolutionCrawlerWorkspaceEventListener : IEventListener, IEventListenerStoppable { + [ImportingConstructor] + public MiscSolutionCrawlerWorkspaceEventListener() + { + } + public void StartListening(Workspace workspace, object serviceOpt) { // misc workspace will enable syntax errors and semantic errors for script files for diff --git a/src/Features/Core/Portable/UseSystemHashCode/UseSystemHashCodeCodeFixProvider.cs b/src/Features/Core/Portable/UseSystemHashCode/UseSystemHashCodeCodeFixProvider.cs index bd412dbe584e67df6a319018eb65e264894e9557..0af707fdd2aedf81a6bed650d259aa35432e25f5 100644 --- a/src/Features/Core/Portable/UseSystemHashCode/UseSystemHashCodeCodeFixProvider.cs +++ b/src/Features/Core/Portable/UseSystemHashCode/UseSystemHashCodeCodeFixProvider.cs @@ -21,6 +21,11 @@ namespace Microsoft.CodeAnalysis.UseSystemHashCode [ExportCodeFixProvider(LanguageNames.CSharp, LanguageNames.VisualBasic), Shared] internal class UseSystemHashCodeCodeFixProvider : SyntaxEditorBasedCodeFixProvider { + [ImportingConstructor] + public UseSystemHashCodeCodeFixProvider() + { + } + public override ImmutableArray FixableDiagnosticIds { get; } = ImmutableArray.Create(IDEDiagnosticIds.UseSystemHashCode); diff --git a/src/Features/LanguageServer/Protocol/Handler/Completion/CompletionHandler.cs b/src/Features/LanguageServer/Protocol/Handler/Completion/CompletionHandler.cs index 039688ea2731a1cab83ed5cca9a8b5d59df8c778..d414848e0e9d21b5801a38ffcb6e1b6c8394ec92 100644 --- a/src/Features/LanguageServer/Protocol/Handler/Completion/CompletionHandler.cs +++ b/src/Features/LanguageServer/Protocol/Handler/Completion/CompletionHandler.cs @@ -21,6 +21,11 @@ namespace Microsoft.CodeAnalysis.LanguageServer.Handler [ExportLspMethod(LSP.Methods.TextDocumentCompletionName)] internal class CompletionHandler : IRequestHandler { + [ImportingConstructor] + public CompletionHandler() + { + } + public async Task HandleRequestAsync(Solution solution, LSP.CompletionParams request, LSP.ClientCapabilities clientCapabilities, CancellationToken cancellationToken) { diff --git a/src/Features/LanguageServer/Protocol/Handler/Completion/CompletionResolveHandler.cs b/src/Features/LanguageServer/Protocol/Handler/Completion/CompletionResolveHandler.cs index 6a268221849618db6036a8b861fa3fad6365c064..ae96f2f4f15c4c1a340178469ffb02cee97d24d6 100644 --- a/src/Features/LanguageServer/Protocol/Handler/Completion/CompletionResolveHandler.cs +++ b/src/Features/LanguageServer/Protocol/Handler/Completion/CompletionResolveHandler.cs @@ -19,6 +19,11 @@ namespace Microsoft.CodeAnalysis.LanguageServer.Handler [ExportLspMethod(LSP.Methods.TextDocumentCompletionResolveName)] internal class CompletionResolveHandler : IRequestHandler { + [ImportingConstructor] + public CompletionResolveHandler() + { + } + public async Task HandleRequestAsync(Solution solution, LSP.CompletionItem completionItem, LSP.ClientCapabilities clientCapabilities, CancellationToken cancellationToken) { diff --git a/src/Features/LanguageServer/Protocol/Handler/FoldingRanges/FoldingRangesHandler.cs b/src/Features/LanguageServer/Protocol/Handler/FoldingRanges/FoldingRangesHandler.cs index b65004591109ba3b3d0935e2689962f21f39995c..ebb4890f4f76544190387b499b8bfcf53f986b54 100644 --- a/src/Features/LanguageServer/Protocol/Handler/FoldingRanges/FoldingRangesHandler.cs +++ b/src/Features/LanguageServer/Protocol/Handler/FoldingRanges/FoldingRangesHandler.cs @@ -13,6 +13,11 @@ namespace Microsoft.CodeAnalysis.LanguageServer.Handler [ExportLspMethod(Methods.TextDocumentFoldingRangeName)] internal class FoldingRangesHandler : IRequestHandler { + [ImportingConstructor] + public FoldingRangesHandler() + { + } + public async Task HandleRequestAsync(Solution solution, FoldingRangeParams request, ClientCapabilities clientCapabilities, CancellationToken cancellationToken) { diff --git a/src/Features/LanguageServer/Protocol/Handler/Formatting/FormatDocumentHandler.cs b/src/Features/LanguageServer/Protocol/Handler/Formatting/FormatDocumentHandler.cs index 692aaeb5a579c435cd5eb925f70897395fc342be..5774eedabb2f99c42000433d446c6569c61fc83d 100644 --- a/src/Features/LanguageServer/Protocol/Handler/Formatting/FormatDocumentHandler.cs +++ b/src/Features/LanguageServer/Protocol/Handler/Formatting/FormatDocumentHandler.cs @@ -11,6 +11,11 @@ namespace Microsoft.CodeAnalysis.LanguageServer.Handler [ExportLspMethod(LSP.Methods.TextDocumentFormattingName)] internal class FormatDocumentHandler : FormatDocumentHandlerBase, IRequestHandler { + [ImportingConstructor] + public FormatDocumentHandler() + { + } + public async Task HandleRequestAsync(Solution solution, LSP.DocumentFormattingParams request, LSP.ClientCapabilities clientCapabilities, CancellationToken cancellationToken) { diff --git a/src/Features/LanguageServer/Protocol/Handler/Formatting/FormatDocumentOnTypeHandler.cs b/src/Features/LanguageServer/Protocol/Handler/Formatting/FormatDocumentOnTypeHandler.cs index 648db349936d54622a4d91c20bdfa98e3d9f954b..d72736d981dd7656e0290db60655c86c512686cb 100644 --- a/src/Features/LanguageServer/Protocol/Handler/Formatting/FormatDocumentOnTypeHandler.cs +++ b/src/Features/LanguageServer/Protocol/Handler/Formatting/FormatDocumentOnTypeHandler.cs @@ -17,6 +17,11 @@ namespace Microsoft.CodeAnalysis.LanguageServer.Handler [ExportLspMethod(Methods.TextDocumentOnTypeFormattingName)] internal class FormatDocumentOnTypeHandler : IRequestHandler { + [ImportingConstructor] + public FormatDocumentOnTypeHandler() + { + } + public async Task HandleRequestAsync(Solution solution, DocumentOnTypeFormattingParams request, ClientCapabilities clientCapabilities, CancellationToken cancellationToken) { diff --git a/src/Features/LanguageServer/Protocol/Handler/Formatting/FormatDocumentRangeHandler.cs b/src/Features/LanguageServer/Protocol/Handler/Formatting/FormatDocumentRangeHandler.cs index d1560fe4d8ef45b49b5c7080a2edb09dc071a7fb..ff209b0c3ae7b1d8c3218f0ba28240d27902cf2e 100644 --- a/src/Features/LanguageServer/Protocol/Handler/Formatting/FormatDocumentRangeHandler.cs +++ b/src/Features/LanguageServer/Protocol/Handler/Formatting/FormatDocumentRangeHandler.cs @@ -11,6 +11,11 @@ namespace Microsoft.CodeAnalysis.LanguageServer.Handler [ExportLspMethod(Methods.TextDocumentRangeFormattingName)] internal class FormatDocumentRangeHandler : FormatDocumentHandlerBase, IRequestHandler { + [ImportingConstructor] + public FormatDocumentRangeHandler() + { + } + public async Task HandleRequestAsync(Solution solution, DocumentRangeFormattingParams request, ClientCapabilities clientCapabilities, CancellationToken cancellationToken) { diff --git a/src/Features/LanguageServer/Protocol/Handler/Highlights/DocumentHighlightHandler.cs b/src/Features/LanguageServer/Protocol/Handler/Highlights/DocumentHighlightHandler.cs index a47ae8bf41c77ecf54a5de7f6904291050c49523..3c82afa678aa0e36657ff2476cd79f01e9389c0b 100644 --- a/src/Features/LanguageServer/Protocol/Handler/Highlights/DocumentHighlightHandler.cs +++ b/src/Features/LanguageServer/Protocol/Handler/Highlights/DocumentHighlightHandler.cs @@ -15,6 +15,11 @@ namespace Microsoft.CodeAnalysis.LanguageServer.Handler [ExportLspMethod(Methods.TextDocumentDocumentHighlightName)] internal class DocumentHighlightsHandler : IRequestHandler { + [ImportingConstructor] + public DocumentHighlightsHandler() + { + } + public async Task HandleRequestAsync(Solution solution, TextDocumentPositionParams request, ClientCapabilities clientCapabilities, CancellationToken cancellationToken) { diff --git a/src/Features/LanguageServer/Protocol/Handler/Hover/HoverHandler.cs b/src/Features/LanguageServer/Protocol/Handler/Hover/HoverHandler.cs index cda877b7c17f42afb853341d2c04a803f7b8bc95..f5d8606ed26c4e8e45fb419e49d3aae24ab7d237 100644 --- a/src/Features/LanguageServer/Protocol/Handler/Hover/HoverHandler.cs +++ b/src/Features/LanguageServer/Protocol/Handler/Hover/HoverHandler.cs @@ -14,6 +14,11 @@ namespace Microsoft.CodeAnalysis.LanguageServer.Handler [ExportLspMethod(Methods.TextDocumentHoverName)] internal class HoverHandler : IRequestHandler { + [ImportingConstructor] + public HoverHandler() + { + } + public async Task HandleRequestAsync(Solution solution, TextDocumentPositionParams request, ClientCapabilities clientCapabilities, CancellationToken cancellationToken) { diff --git a/src/Features/LanguageServer/Protocol/Handler/Initialize/InitializeHandler.cs b/src/Features/LanguageServer/Protocol/Handler/Initialize/InitializeHandler.cs index b298bf23537a40332f69cc1c3011f535f11ae021..2664229c162e549af31ba232f2d172294104c113 100644 --- a/src/Features/LanguageServer/Protocol/Handler/Initialize/InitializeHandler.cs +++ b/src/Features/LanguageServer/Protocol/Handler/Initialize/InitializeHandler.cs @@ -28,6 +28,11 @@ internal class InitializeHandler : IRequestHandler HandleRequestAsync(Solution solution, InitializeParams request, ClientCapabilities clientCapabilities, CancellationToken cancellationToken) => Task.FromResult(s_initializeResult); } diff --git a/src/Features/LanguageServer/Protocol/Handler/References/FindImplementationsHandler.cs b/src/Features/LanguageServer/Protocol/Handler/References/FindImplementationsHandler.cs index 1454a103e18278a84d8d917bc9b033d1e3b58e76..caae00ac48ac8f44a41a4fcb5d818109ba2d8849 100644 --- a/src/Features/LanguageServer/Protocol/Handler/References/FindImplementationsHandler.cs +++ b/src/Features/LanguageServer/Protocol/Handler/References/FindImplementationsHandler.cs @@ -14,6 +14,11 @@ namespace Microsoft.CodeAnalysis.LanguageServer.Handler [ExportLspMethod(LSP.Methods.TextDocumentImplementationName)] internal class FindImplementationsHandler : IRequestHandler { + [ImportingConstructor] + public FindImplementationsHandler() + { + } + public async Task HandleRequestAsync(Solution solution, LSP.TextDocumentPositionParams request, LSP.ClientCapabilities clientCapabilities, CancellationToken cancellationToken) { diff --git a/src/Features/LanguageServer/Protocol/Handler/Symbols/DocumentSymbolsHandler.cs b/src/Features/LanguageServer/Protocol/Handler/Symbols/DocumentSymbolsHandler.cs index 4a49da1ec7f5a3f32f569078b466867617c9b8cf..e1208bd5e36342f200340e240dd050d720356e5a 100644 --- a/src/Features/LanguageServer/Protocol/Handler/Symbols/DocumentSymbolsHandler.cs +++ b/src/Features/LanguageServer/Protocol/Handler/Symbols/DocumentSymbolsHandler.cs @@ -20,6 +20,11 @@ namespace Microsoft.CodeAnalysis.LanguageServer.Handler [ExportLspMethod(Methods.TextDocumentDocumentSymbolName)] internal class DocumentSymbolsHandler : IRequestHandler { + [ImportingConstructor] + public DocumentSymbolsHandler() + { + } + public async Task HandleRequestAsync(Solution solution, DocumentSymbolParams request, ClientCapabilities clientCapabilities, CancellationToken cancellationToken) { diff --git a/src/Features/LanguageServer/Protocol/Handler/Symbols/WorkspaceSymbolsHandler.cs b/src/Features/LanguageServer/Protocol/Handler/Symbols/WorkspaceSymbolsHandler.cs index 7c9a58402478f98c582451cad6689d0ebf11f6e0..94b225973bb3b3c11fc0c2fc41c6cddd2f3d2cec 100644 --- a/src/Features/LanguageServer/Protocol/Handler/Symbols/WorkspaceSymbolsHandler.cs +++ b/src/Features/LanguageServer/Protocol/Handler/Symbols/WorkspaceSymbolsHandler.cs @@ -14,6 +14,11 @@ namespace Microsoft.CodeAnalysis.LanguageServer.Handler [ExportLspMethod(Methods.WorkspaceSymbolName)] internal class WorkspaceSymbolsHandler : IRequestHandler { + [ImportingConstructor] + public WorkspaceSymbolsHandler() + { + } + public async Task HandleRequestAsync(Solution solution, WorkspaceSymbolParams request, ClientCapabilities clientCapabilities, CancellationToken cancellationToken) { diff --git a/src/Features/VisualBasic/Portable/CodeRefactorings/VisualBasicRefactoringHelpersService.vb b/src/Features/VisualBasic/Portable/CodeRefactorings/VisualBasicRefactoringHelpersService.vb index c26a70a8880c06143a04b5f34576c81ca6dd214c..a49ad9f872820fec3fb7ecc82f75533580880b1c 100644 --- a/src/Features/VisualBasic/Portable/CodeRefactorings/VisualBasicRefactoringHelpersService.vb +++ b/src/Features/VisualBasic/Portable/CodeRefactorings/VisualBasicRefactoringHelpersService.vb @@ -11,6 +11,10 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.CodeRefactorings Friend Class VisualBasicRefactoringHelpersService Inherits AbstractRefactoringHelpersService(Of ExpressionSyntax, ArgumentSyntax, ExpressionStatementSyntax) + + Public Sub New() + End Sub + Protected Overrides Iterator Function ExtractNodesSimple(node As SyntaxNode, syntaxFacts As ISyntaxFactsService) As IEnumerable(Of SyntaxNode) For Each baseExtraction In MyBase.ExtractNodesSimple(node, syntaxFacts) Yield baseExtraction diff --git a/src/Features/VisualBasic/Portable/IntroduceVariable/VisualBasicIntroduceLocalForExpressionCodeRefactoringProvider.vb b/src/Features/VisualBasic/Portable/IntroduceVariable/VisualBasicIntroduceLocalForExpressionCodeRefactoringProvider.vb index af48d21aa34942909f1bb50b997e3e3222500cbb..57eb9707d0ccfca7cd2a15565f8eb46403e8d1a0 100644 --- a/src/Features/VisualBasic/Portable/IntroduceVariable/VisualBasicIntroduceLocalForExpressionCodeRefactoringProvider.vb +++ b/src/Features/VisualBasic/Portable/IntroduceVariable/VisualBasicIntroduceLocalForExpressionCodeRefactoringProvider.vb @@ -15,6 +15,10 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.IntroduceVariable ExpressionStatementSyntax, LocalDeclarationStatementSyntax) + + Public Sub New() + End Sub + Protected Overrides Function IsValid(expressionStatement As ExpressionStatementSyntax, span As TextSpan) As Boolean ' Expression is likely too simple to want to offer to generate a local for. ' This leads to too many false cases where this is offered. diff --git a/src/Features/VisualBasic/Portable/MoveDeclarationNearReference/VisualBasicMoveDeclarationNearRefactoringProvider.vb b/src/Features/VisualBasic/Portable/MoveDeclarationNearReference/VisualBasicMoveDeclarationNearRefactoringProvider.vb index 257a32bbc7707c66d4325e3c0376022099247889..c9b5110489ae2e77345e13399fc0e5b2a2314613 100644 --- a/src/Features/VisualBasic/Portable/MoveDeclarationNearReference/VisualBasicMoveDeclarationNearRefactoringProvider.vb +++ b/src/Features/VisualBasic/Portable/MoveDeclarationNearReference/VisualBasicMoveDeclarationNearRefactoringProvider.vb @@ -10,5 +10,9 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.MoveDeclarationNearReference Class VisualBasicMoveDeclarationNearReferenceCodeRefactoringProvider Inherits AbstractMoveDeclarationNearReferenceCodeRefactoringProvider(Of LocalDeclarationStatementSyntax) + + + Public Sub New() + End Sub End Class End Namespace diff --git a/src/Features/VisualBasic/Portable/PopulateSwitch/VisualBasicPopulateSwitchStatementCodeFixProvider.vb b/src/Features/VisualBasic/Portable/PopulateSwitch/VisualBasicPopulateSwitchStatementCodeFixProvider.vb index 31d781b92b74891fb5f01634af04c34fe73d4222..e3962933a16fc9b998dff3ad24e7842f2099b0a3 100644 --- a/src/Features/VisualBasic/Portable/PopulateSwitch/VisualBasicPopulateSwitchStatementCodeFixProvider.vb +++ b/src/Features/VisualBasic/Portable/PopulateSwitch/VisualBasicPopulateSwitchStatementCodeFixProvider.vb @@ -12,5 +12,9 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.PopulateSwitch Friend Class VisualBasicPopulateSwitchStatementCodeFixProvider Inherits AbstractPopulateSwitchStatementCodeFixProvider(Of SelectBlockSyntax, CaseBlockSyntax, MemberAccessExpressionSyntax) + + + Public Sub New() + End Sub End Class End Namespace diff --git a/src/Features/VisualBasic/Portable/SignatureHelp/CollectionInitializerSignatureHelpProvider.vb b/src/Features/VisualBasic/Portable/SignatureHelp/CollectionInitializerSignatureHelpProvider.vb index 964b6e1552dc4abb8408fa611541b85f97f09a62..e67d679456c89cfc96261ac81049f3400cea98a3 100644 --- a/src/Features/VisualBasic/Portable/SignatureHelp/CollectionInitializerSignatureHelpProvider.vb +++ b/src/Features/VisualBasic/Portable/SignatureHelp/CollectionInitializerSignatureHelpProvider.vb @@ -13,6 +13,10 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.SignatureHelp Partial Friend Class CollectionInitializerSignatureHelpProvider Inherits AbstractOrdinaryMethodSignatureHelpProvider + + Public Sub New() + End Sub + Public Overrides Function IsTriggerCharacter(ch As Char) As Boolean Return ch = "{"c OrElse ch = ","c End Function diff --git a/src/Features/VisualBasic/Portable/SimplifyInterpolation/VisualBasicSimplifyInterpolationCodeFixProvider.vb b/src/Features/VisualBasic/Portable/SimplifyInterpolation/VisualBasicSimplifyInterpolationCodeFixProvider.vb index ee857235e88e52b0efb630219d80040cb4967a79..8adc59329632d13bd5258630f9a26c0c3c56d48f 100644 --- a/src/Features/VisualBasic/Portable/SimplifyInterpolation/VisualBasicSimplifyInterpolationCodeFixProvider.vb +++ b/src/Features/VisualBasic/Portable/SimplifyInterpolation/VisualBasicSimplifyInterpolationCodeFixProvider.vb @@ -12,6 +12,10 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.SimplifyInterpolation InterpolationSyntax, ExpressionSyntax, InterpolationAlignmentClauseSyntax, InterpolationFormatClauseSyntax, InterpolatedStringExpressionSyntax) + + Public Sub New() + End Sub + Protected Overrides Function WithExpression(interpolation As InterpolationSyntax, expression As ExpressionSyntax) As InterpolationSyntax Return interpolation.WithExpression(expression) End Function diff --git a/src/Tools/AnalyzerRunner/PersistentStorageLocationService.cs b/src/Tools/AnalyzerRunner/PersistentStorageLocationService.cs index 6e1d7452b143aaeca661a451a949cbabda0aa771..6750d9fa9acc7f09f4adb6b9cd87c6c9b9a69e91 100644 --- a/src/Tools/AnalyzerRunner/PersistentStorageLocationService.cs +++ b/src/Tools/AnalyzerRunner/PersistentStorageLocationService.cs @@ -12,6 +12,11 @@ namespace AnalyzerRunner [Shared] internal class PersistentStorageLocationService : IPersistentStorageLocationService { + [ImportingConstructor] + public PersistentStorageLocationService() + { + } + public bool IsSupported(Workspace workspace) => true; public string TryGetStorageLocation(Solution _) diff --git a/src/Tools/ExternalAccess/FSharp/Internal/CommentSelection/FSharpCommentSelectionService.cs b/src/Tools/ExternalAccess/FSharp/Internal/CommentSelection/FSharpCommentSelectionService.cs index a68e6b54afff260bf23d3ff0a8e07c86afa41cea..831565c30c9bd04c4cb9e26dd17789ac2c969281 100644 --- a/src/Tools/ExternalAccess/FSharp/Internal/CommentSelection/FSharpCommentSelectionService.cs +++ b/src/Tools/ExternalAccess/FSharp/Internal/CommentSelection/FSharpCommentSelectionService.cs @@ -14,6 +14,11 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.FSharp.Internal.CommentSelection [ExportLanguageService(typeof(ICommentSelectionService), LanguageNames.FSharp)] internal class FSharpCommentSelectionService : ICommentSelectionService { + [ImportingConstructor] + public FSharpCommentSelectionService() + { + } + public Task FormatAsync(Document document, ImmutableArray changes, CancellationToken cancellationToken) { return Task.FromResult(document); diff --git a/src/Tools/ExternalAccess/FSharp/Navigation/FSharpDocumentNavigationService.cs b/src/Tools/ExternalAccess/FSharp/Navigation/FSharpDocumentNavigationService.cs index eaf9c8d1deaaa3b9992ed7b384997b69a183d467..2e45fbd036827c9960cf0297e66b66e990bad0dd 100644 --- a/src/Tools/ExternalAccess/FSharp/Navigation/FSharpDocumentNavigationService.cs +++ b/src/Tools/ExternalAccess/FSharp/Navigation/FSharpDocumentNavigationService.cs @@ -11,6 +11,11 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.FSharp.Navigation [ExportWorkspaceService(typeof(IFSharpDocumentNavigationService)), Shared] internal class FSharpDocumentNavigationService : IFSharpDocumentNavigationService { + [ImportingConstructor] + public FSharpDocumentNavigationService() + { + } + /// /// Determines whether it is possible to navigate to the given position in the specified document. /// diff --git a/src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpProjectExistsUIContextProviderLanguageService.cs b/src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpProjectExistsUIContextProviderLanguageService.cs index 5e823ffa922d0476cf0a815c8fa0797353dc94f2..0f133eb7ec5c4a0c082b4b7d35cf051584a8442b 100644 --- a/src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpProjectExistsUIContextProviderLanguageService.cs +++ b/src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpProjectExistsUIContextProviderLanguageService.cs @@ -14,6 +14,11 @@ namespace Microsoft.VisualStudio.LanguageServices.CSharp.ProjectSystemShim [ExportLanguageService(typeof(IProjectExistsUIContextProviderLanguageService), LanguageNames.CSharp), Shared] internal sealed class CSharpProjectExistsUIContextProviderLanguageService : IProjectExistsUIContextProviderLanguageService { + [ImportingConstructor] + public CSharpProjectExistsUIContextProviderLanguageService() + { + } + public UIContext GetUIContext() { return UIContext.FromUIContextGuid(Guids.CSharpProjectExistsInWorkspaceUIContext); diff --git a/src/VisualStudio/Core/Def/Experimentation/ExperimentationOptions.cs b/src/VisualStudio/Core/Def/Experimentation/ExperimentationOptions.cs index fe3a1738d166311a58c63cfb1a1f2047dc9f44ab..40477012a6a778486c19d4e8c89b6e6987330cae 100644 --- a/src/VisualStudio/Core/Def/Experimentation/ExperimentationOptions.cs +++ b/src/VisualStudio/Core/Def/Experimentation/ExperimentationOptions.cs @@ -15,6 +15,11 @@ internal static class ExperimentationOptions [ExportOptionProvider, Shared] internal class ExperimentationOptionsProvider : IOptionProvider { + [ImportingConstructor] + public ExperimentationOptionsProvider() + { + } + public ImmutableArray Options { get; } = ImmutableArray.Empty; } } diff --git a/src/VisualStudio/Core/Def/Implementation/FindReferences/ContainingMemberColumnDefinition.cs b/src/VisualStudio/Core/Def/Implementation/FindReferences/ContainingMemberColumnDefinition.cs index 53961d30c79ed15efc836c752a640b92b0a9c713..87e62c298ab7f1397233047289bbf8114d48b9b1 100644 --- a/src/VisualStudio/Core/Def/Implementation/FindReferences/ContainingMemberColumnDefinition.cs +++ b/src/VisualStudio/Core/Def/Implementation/FindReferences/ContainingMemberColumnDefinition.cs @@ -16,6 +16,12 @@ namespace Microsoft.VisualStudio.LanguageServices.Implementation.FindReferences internal class ContainingMemberColumnDefinition : TableColumnDefinitionBase { public const string ColumnName = AbstractReferenceFinder.ContainingMemberInfoPropertyName; + + [ImportingConstructor] + public ContainingMemberColumnDefinition() + { + } + public override bool IsFilterable => true; public override string Name => ColumnName; public override string DisplayName => ServicesVSResources.Containing_member; diff --git a/src/VisualStudio/Core/Def/Implementation/FindReferences/ContainingTypeColumnDefinition.cs b/src/VisualStudio/Core/Def/Implementation/FindReferences/ContainingTypeColumnDefinition.cs index ef785706d87e1a4c6c80442245461cb42fb64d75..cc670e5067fb8ea13c1ff496cfd2898c59815274 100644 --- a/src/VisualStudio/Core/Def/Implementation/FindReferences/ContainingTypeColumnDefinition.cs +++ b/src/VisualStudio/Core/Def/Implementation/FindReferences/ContainingTypeColumnDefinition.cs @@ -16,6 +16,12 @@ namespace Microsoft.VisualStudio.LanguageServices.Implementation.FindReferences internal class ContainingTypeColumnDefinition : TableColumnDefinitionBase { public const string ColumnName = AbstractReferenceFinder.ContainingTypeInfoPropertyName; + + [ImportingConstructor] + public ContainingTypeColumnDefinition() + { + } + public override bool IsFilterable => true; public override string Name => ColumnName; public override string DisplayName => ServicesVSResources.Containing_type; diff --git a/src/VisualStudio/Core/Def/Implementation/Remote/RemoteHostClientServiceFactory.WorkspaceEventListener.cs b/src/VisualStudio/Core/Def/Implementation/Remote/RemoteHostClientServiceFactory.WorkspaceEventListener.cs index 1fd11e8dd522cc49612dd501d901af83dfc9fc32..87b94f6cbe24f731782b946ac98bb7a442a37cf2 100644 --- a/src/VisualStudio/Core/Def/Implementation/Remote/RemoteHostClientServiceFactory.WorkspaceEventListener.cs +++ b/src/VisualStudio/Core/Def/Implementation/Remote/RemoteHostClientServiceFactory.WorkspaceEventListener.cs @@ -13,6 +13,11 @@ internal partial class RemoteHostClientServiceFactory : IWorkspaceServiceFactory [ExportEventListener(WellKnownEventListeners.Workspace, WorkspaceKind.Host), Shared] private sealed class RemoteHostWorkspaceEventListener : IEventListener { + [ImportingConstructor] + public RemoteHostWorkspaceEventListener() + { + } + public void StartListening(Workspace workspace, object serviceOpt) { var service = (RemoteHostClientService)workspace.Services.GetService(); diff --git a/src/VisualStudio/Core/Def/Storage/VisualStudioPersistentStorageLocationService.cs b/src/VisualStudio/Core/Def/Storage/VisualStudioPersistentStorageLocationService.cs index c0c29f80c9157aa9f650a07abc9bfd6f096fdec8..f01be48b1341e3942e47ca3ddcafc80f02cfad55 100644 --- a/src/VisualStudio/Core/Def/Storage/VisualStudioPersistentStorageLocationService.cs +++ b/src/VisualStudio/Core/Def/Storage/VisualStudioPersistentStorageLocationService.cs @@ -10,6 +10,11 @@ namespace Microsoft.VisualStudio.LanguageServices.Storage [ExportWorkspaceService(typeof(IPersistentStorageLocationService), ServiceLayer.Host), Shared] internal class VisualStudioPersistentStorageLocationService : DefaultPersistentStorageLocationService { + [ImportingConstructor] + public VisualStudioPersistentStorageLocationService() + { + } + public override bool IsSupported(Workspace workspace) => workspace is VisualStudioWorkspace; } diff --git a/src/VisualStudio/LiveShare/Impl/ClassificationsHandler.cs b/src/VisualStudio/LiveShare/Impl/ClassificationsHandler.cs index d524eba6d2542e8295762fbcc19b8a12cb11cf82..ad7152e347782f6705cd7b192b67b2beacd48e2a 100644 --- a/src/VisualStudio/LiveShare/Impl/ClassificationsHandler.cs +++ b/src/VisualStudio/LiveShare/Impl/ClassificationsHandler.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel.Composition; using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis; @@ -30,20 +31,36 @@ protected override async Task AddClassificationsAsync(IClassificationService cla [Obsolete("Used for backwards compatibility with old liveshare clients.")] internal class RoslynClassificationsHandler : ClassificationsHandler { + [ImportingConstructor] + public RoslynClassificationsHandler() + { + } } [ExportLspRequestHandler(LiveShareConstants.CSharpContractName, RoslynMethods.ClassificationsName)] internal class CSharpClassificationsHandler : ClassificationsHandler { + [ImportingConstructor] + public CSharpClassificationsHandler() + { + } } [ExportLspRequestHandler(LiveShareConstants.VisualBasicContractName, RoslynMethods.ClassificationsName)] internal class VisualBasicClassificationsHandler : ClassificationsHandler { + [ImportingConstructor] + public VisualBasicClassificationsHandler() + { + } } [ExportLspRequestHandler(LiveShareConstants.TypeScriptContractName, RoslynMethods.ClassificationsName)] internal class TypeScriptClassificationsHandler : ClassificationsHandler { + [ImportingConstructor] + public TypeScriptClassificationsHandler() + { + } } } diff --git a/src/VisualStudio/LiveShare/Impl/Client/Classification/RoslynClassificationService.Exports.cs b/src/VisualStudio/LiveShare/Impl/Client/Classification/RoslynClassificationService.Exports.cs index e98187a331648bc018ea969be6bb8bbd8e020a97..5227432ab0c2432089bab341a790f8539d970d39 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/Classification/RoslynClassificationService.Exports.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/Classification/RoslynClassificationService.Exports.cs @@ -10,12 +10,22 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.Classificatio [ExportLanguageServiceFactory(typeof(IClassificationService), StringConstants.CSharpLspLanguageName), Shared] internal class CSharpLspClassificationServiceFactory : RoslynClassificationServiceFactory { + [ImportingConstructor] + public CSharpLspClassificationServiceFactory() + { + } + protected override string LiveShareContentType => StringConstants.CSharpLspLanguageName; } [ExportLanguageServiceFactory(typeof(IClassificationService), StringConstants.VBLspLanguageName), Shared] internal class VBLspClassificationServiceFactory : RoslynClassificationServiceFactory { + [ImportingConstructor] + public VBLspClassificationServiceFactory() + { + } + protected override string LiveShareContentType => StringConstants.VBLspLanguageName; } diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteBlockStructureService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteBlockStructureService.cs index 687b76871c8fd0745215d6d122c29eed967965f4..5dd1c24476d1e3df785eb2a483d3ab0aa56d2481 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteBlockStructureService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteBlockStructureService.cs @@ -10,6 +10,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(BlockStructureService), StringConstants.CSharpLspLanguageName), Shared] internal class CSharpLspBlockStructureServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public CSharpLspBlockStructureServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteBraceCompletionService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteBraceCompletionService.cs index 1e5a83507ed9bd5b311443ca56779741ae33d5ea..abb3ef3d882bf2c5682a7744293285eefc7f04d6 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteBraceCompletionService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteBraceCompletionService.cs @@ -10,6 +10,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(IEditorBraceCompletionSessionFactory), StringConstants.CSharpLspLanguageName), Shared] internal class CSharpLspBraceCompletionServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public CSharpLspBraceCompletionServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteCompilationFactoryService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteCompilationFactoryService.cs index 32a5585b0a68deb9bb26fe243baf6560c6a256ab..323770963353eb550a582dd05efc43133dc50ad0 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteCompilationFactoryService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteCompilationFactoryService.cs @@ -9,6 +9,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(ICompilationFactoryService), StringConstants.CSharpLspLanguageName), Shared] internal class CSharpRemoteCompilationFactoryService : ILanguageServiceFactory { + [ImportingConstructor] + public CSharpRemoteCompilationFactoryService() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteDocumentDifferenceService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteDocumentDifferenceService.cs index 7e3f5f5dca9f28c770c598ae36087da0690d59f0..7d6adfc2592a98fd39b905c4b2337499d90cc834 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteDocumentDifferenceService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteDocumentDifferenceService.cs @@ -10,6 +10,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(IDocumentDifferenceService), StringConstants.CSharpLspLanguageName), Shared] internal class CSharpLspDocumentDifferenceServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public CSharpLspDocumentDifferenceServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteLineSeparatorService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteLineSeparatorService.cs index 3a3f0e81b4a83f674496b8b5d33d5971c909235d..7779d8cea4aed59937bd05d95e41c37b7533719f 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteLineSeparatorService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteLineSeparatorService.cs @@ -10,6 +10,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(ILineSeparatorService), StringConstants.CSharpLspLanguageName), Shared] internal class CSharpLspLineSeparatorServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public CSharpLspLineSeparatorServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteRenameTrackingLanguageHeuristicsService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteRenameTrackingLanguageHeuristicsService.cs index 4128abaa9b2157ad7d3db76bc22a11dd037db31b..157840e79cfe006d0ced7aad86f980cf13a5461c 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteRenameTrackingLanguageHeuristicsService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteRenameTrackingLanguageHeuristicsService.cs @@ -9,6 +9,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageService(typeof(IRenameTrackingLanguageHeuristicsService), StringConstants.CSharpLspLanguageName), Shared] internal class CSharpLspRenameTrackingLanguageHeuristicsService : IRenameTrackingLanguageHeuristicsService { + [ImportingConstructor] + public CSharpLspRenameTrackingLanguageHeuristicsService() + { + } + public bool IsIdentifierValidForRenameTracking(string name) { return false; diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteSyntaxFactsService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteSyntaxFactsService.cs index 9ea41a9488aa3438bbde3a46be41ffb781682cf0..373b992280c3cc1f6e5bb60b14ff97dff972507e 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteSyntaxFactsService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteSyntaxFactsService.cs @@ -10,6 +10,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(ISyntaxFactsService), StringConstants.CSharpLspLanguageName), Shared] internal class CSharpLspSyntaxFactsServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public CSharpLspSyntaxFactsServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteSyntaxTreeFactoryService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteSyntaxTreeFactoryService.cs index 61903b44525b6ec2cfedc6e94c00123979c144ac..a0c06083cd7af1ca4ef2dfb6f97280a32bb9ddc1 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteSyntaxTreeFactoryService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/CSharpRemoteSyntaxTreeFactoryService.cs @@ -9,6 +9,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(ISyntaxTreeFactoryService), StringConstants.CSharpLspLanguageName), Shared] internal class CSharpLspSyntaxTreeFactoryServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public CSharpLspSyntaxTreeFactoryServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Comments/CSharpRemoteCommentSelectionService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Comments/CSharpRemoteCommentSelectionService.cs index 0c25cc570550a27045df61c7c533302c9b3287a5..ef76c1b00f51cbe0a83ea9270f66b58af0d20fe3 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Comments/CSharpRemoteCommentSelectionService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Comments/CSharpRemoteCommentSelectionService.cs @@ -10,6 +10,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(ICommentSelectionService), StringConstants.CSharpLspLanguageName), Shared] internal class CSharpLspCommentSelectionServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public CSharpLspCommentSelectionServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Comments/CSharpRemoteDocumentationCommentFormattingService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Comments/CSharpRemoteDocumentationCommentFormattingService.cs index 0fd1de7397c6784523bf4d251958c700b443694f..3d9dfb33c8e27bc96e6c45842993bcbb9978eecc 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Comments/CSharpRemoteDocumentationCommentFormattingService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Comments/CSharpRemoteDocumentationCommentFormattingService.cs @@ -10,6 +10,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(IDocumentationCommentFormattingService), StringConstants.CSharpLspLanguageName), Shared] internal class CSharpLspDocumentationCommentFormattingServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public CSharpLspDocumentationCommentFormattingServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Comments/VBRemoteCommentSelectionService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Comments/VBRemoteCommentSelectionService.cs index 14260db3ebfbe533e46cdb4dd62daccfe22eb824..69dcbcd6f1812172351fcbe9bb4ba881a36ee276 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Comments/VBRemoteCommentSelectionService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Comments/VBRemoteCommentSelectionService.cs @@ -10,6 +10,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(ICommentSelectionService), StringConstants.VBLspLanguageName), Shared] internal class VBLspCommentSelectionServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public VBLspCommentSelectionServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Comments/VBRemoteDocumentationCommentFormattingService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Comments/VBRemoteDocumentationCommentFormattingService.cs index 1ba8ff469041640bb7216fe609581c88ce053a22..a5d4c5e7661b877691f36b02e4ca7e46a4216797 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Comments/VBRemoteDocumentationCommentFormattingService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Comments/VBRemoteDocumentationCommentFormattingService.cs @@ -10,6 +10,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(IDocumentationCommentFormattingService), StringConstants.VBLspLanguageName), Shared] internal class VBLspDocumentationCommentFormattingServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public VBLspDocumentationCommentFormattingServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Debugging/CSharpRemoteBreakpointService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Debugging/CSharpRemoteBreakpointService.cs index ba364416dc9d2349c6908d4ce52e953e28cf11e3..c9562ecd726b7fedb0d71aa93f8203154a9b71d1 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Debugging/CSharpRemoteBreakpointService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Debugging/CSharpRemoteBreakpointService.cs @@ -16,6 +16,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(IBreakpointResolutionService), StringConstants.CSharpLspLanguageName), Shared] internal class CSharpLspBreakpointServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public CSharpLspBreakpointServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return new CSharpRemoteBreakpointService(languageServices); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Debugging/CSharpRemoteDebugInfoService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Debugging/CSharpRemoteDebugInfoService.cs index 5b527c77fee45528999d32903c1297a312ebdf23..e11bb2fc9f890ab841441b21d9f63c7c86e28b3b 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Debugging/CSharpRemoteDebugInfoService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Debugging/CSharpRemoteDebugInfoService.cs @@ -16,6 +16,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(ILanguageDebugInfoService), StringConstants.CSharpLspLanguageName), Shared] internal class CSharpLspDebugInfoServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public CSharpLspDebugInfoServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return new CSharpRemoteDebugInfoService(languageServices); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Debugging/VBRemoteBreakpointService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Debugging/VBRemoteBreakpointService.cs index 7582bf764bdca4fcfcd4ced0191b8a4fa298ed72..328ee2e601b6768be662b0cc482122f927d14012 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Debugging/VBRemoteBreakpointService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Debugging/VBRemoteBreakpointService.cs @@ -18,6 +18,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(IBreakpointResolutionService), StringConstants.VBLspLanguageName), Shared] internal class VBLspBreakpointServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public VBLspBreakpointServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return new VBRemoteBreakpointService(languageServices); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Debugging/VBRemoteDebugInfoService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Debugging/VBRemoteDebugInfoService.cs index 2936bfac3140ae777c4a20bea66b53959e1dd201..f035121ba6631f048937ea7fc529eb4bc8e0937b 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Debugging/VBRemoteDebugInfoService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Debugging/VBRemoteDebugInfoService.cs @@ -16,6 +16,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(ILanguageDebugInfoService), StringConstants.VBLspLanguageName), Shared] internal class VBLspDebugInfoServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public VBLspDebugInfoServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return new VBRemoteDebugInfoService(languageServices); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/CSharpRemoteEditorFormattingService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/CSharpRemoteEditorFormattingService.cs index 7a566e80930b86b3fc26696e5ed112882c5c2c02..44582a745b9edca81083ba1105a949048d30fa1c 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/CSharpRemoteEditorFormattingService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/CSharpRemoteEditorFormattingService.cs @@ -10,6 +10,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(IEditorFormattingService), StringConstants.CSharpLspLanguageName), Shared] internal class CSharpLspEditorFormattingServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public CSharpLspEditorFormattingServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/CSharpRemoteFormattingService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/CSharpRemoteFormattingService.cs index 370a11a57621c323c5d1e8fcb56ed769251d2775..36a68ff45defed1d7ab24a14055f2e39ee3484e7 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/CSharpRemoteFormattingService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/CSharpRemoteFormattingService.cs @@ -10,6 +10,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(IFormattingService), StringConstants.CSharpLspLanguageName), Shared] internal class CSharpLspFormattingServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public CSharpLspFormattingServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/CSharpRemoteIndentationService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/CSharpRemoteIndentationService.cs index 6ca8bfa622f086f93449731b69ca28d2857d8019..8d8e5add2452ce78f9a68e66fd2b69c522f3b22b 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/CSharpRemoteIndentationService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/CSharpRemoteIndentationService.cs @@ -10,6 +10,10 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(IIndentationService), StringConstants.CSharpLspLanguageName), Shared] internal class CSharpLspIndentationServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public CSharpLspIndentationServiceFactory() + { + } public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/CSharpRemoteSyntaxFormattingService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/CSharpRemoteSyntaxFormattingService.cs index 85319297c690ad1bec3561b633df27d5451bdbad..0b4b2d974dfd1f48597581e0b278edeccab42cb6 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/CSharpRemoteSyntaxFormattingService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/CSharpRemoteSyntaxFormattingService.cs @@ -10,6 +10,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(ISyntaxFormattingService), StringConstants.CSharpLspLanguageName), Shared] internal class CSharpLspSyntaxFormattingServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public CSharpLspSyntaxFormattingServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/VBRemoteEditorFormattingService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/VBRemoteEditorFormattingService.cs index f0fa9015a556c1d726eb933d18b1c49b63bd818b..fbf9a94f7d4d15503a85c65b3ddfcab9f9b3819d 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/VBRemoteEditorFormattingService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/VBRemoteEditorFormattingService.cs @@ -10,6 +10,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(IEditorFormattingService), StringConstants.VBLspLanguageName), Shared] internal class VBLspEditorFormattingServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public VBLspEditorFormattingServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/VBRemoteFormattingService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/VBRemoteFormattingService.cs index b2a5a18fe03ae1ec34250db69ffe7ad25619046b..b88e12f2cf8ad109a47531ae33b115f65202063b 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/VBRemoteFormattingService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/VBRemoteFormattingService.cs @@ -10,6 +10,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(IFormattingService), StringConstants.VBLspLanguageName), Shared] internal class VBLspFormattingServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public VBLspFormattingServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/VBRemoteIndentationService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/VBRemoteIndentationService.cs index 9c4d765c02e05ee94bdb1b13fe3bf474dd03150c..1f97a41c04c8aa9f5c99efecd1c51b9c6ac95ab0 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/VBRemoteIndentationService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/VBRemoteIndentationService.cs @@ -12,6 +12,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [Obsolete] internal class VBLspIndentationServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public VBLspIndentationServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/VBRemoteSyntaxFormattingService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/VBRemoteSyntaxFormattingService.cs index 76d9bb4f68010fb852e228f23055d92701890472..c882e7d55ced64ced45d7b343c53231487b406ad 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/VBRemoteSyntaxFormattingService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/Formatting/VBRemoteSyntaxFormattingService.cs @@ -10,6 +10,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(ISyntaxFormattingService), StringConstants.VBLspLanguageName), Shared] internal class VBLspSyntaxFormattingServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public VBLspSyntaxFormattingServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteBlockStructureService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteBlockStructureService.cs index ff74fcbc6539536d56f3b4fbe041d73ee56e1673..4e43d1f61e25ca9bdf4088dafee871c2d9ac9624 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteBlockStructureService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteBlockStructureService.cs @@ -10,6 +10,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(BlockStructureService), StringConstants.VBLspLanguageName), Shared] internal class VBLspBlockStructureServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public VBLspBlockStructureServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteBraceCompletionService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteBraceCompletionService.cs index 2959ce62cfa8248a65d81878f6b42f3411fd6c9c..0ad4d66ecf2c94e04db581509d1e9bbd271047c2 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteBraceCompletionService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteBraceCompletionService.cs @@ -10,6 +10,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(IEditorBraceCompletionSessionFactory), StringConstants.VBLspLanguageName), Shared] internal class VBLspBraceCompletionServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public VBLspBraceCompletionServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteCompilationFactoryService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteCompilationFactoryService.cs index f429f022be290f01ef4b16370de1a92fc608a252..2fbdea904bc49b41b86f12fa335f2ae8536317ee 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteCompilationFactoryService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteCompilationFactoryService.cs @@ -9,6 +9,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(ICompilationFactoryService), StringConstants.VBLspLanguageName), Shared] internal class VBRemoteCompilationFactoryService : ILanguageServiceFactory { + [ImportingConstructor] + public VBRemoteCompilationFactoryService() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteDocumentDifferenceService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteDocumentDifferenceService.cs index aa0bcfa73649e7290cb55713fd5464478caebd8f..d76f4c2024cb319e33768375fdea1ac463b43dde 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteDocumentDifferenceService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteDocumentDifferenceService.cs @@ -10,6 +10,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(IDocumentDifferenceService), StringConstants.VBLspLanguageName), Shared] internal class VBLspDocumentDifferenceServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public VBLspDocumentDifferenceServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteLineSeparatorService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteLineSeparatorService.cs index f20d10184db0288ba15dd93c5027037b5f1ca904..d02b4222021a6004b5c13aedbfd7317d52d19220 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteLineSeparatorService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteLineSeparatorService.cs @@ -10,6 +10,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(ILineSeparatorService), StringConstants.VBLspLanguageName), Shared] internal class VBLspLineSeparatorServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public VBLspLineSeparatorServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteRenameTrackingLanguageHeuristicsService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteRenameTrackingLanguageHeuristicsService.cs index e608bab0932a7c56eea62361afb229be54ba4029..0fabbd22d7eb7afd6cc36c986840f0b016da577a 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteRenameTrackingLanguageHeuristicsService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteRenameTrackingLanguageHeuristicsService.cs @@ -9,6 +9,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageService(typeof(IRenameTrackingLanguageHeuristicsService), StringConstants.VBLspLanguageName), Shared] internal class VBLspRenameTrackingLanguageHeuristicsService : IRenameTrackingLanguageHeuristicsService { + [ImportingConstructor] + public VBLspRenameTrackingLanguageHeuristicsService() + { + } + public bool IsIdentifierValidForRenameTracking(string name) { return false; diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteSyntaxFactsService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteSyntaxFactsService.cs index cb8e6b4b11f02c988c72faad2187893aee88d103..6de4fa566bc6065868ec4ea4f3d3adc55a41b2f6 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteSyntaxFactsService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteSyntaxFactsService.cs @@ -10,6 +10,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(ISyntaxFactsService), StringConstants.VBLspLanguageName), Shared] internal class VBLspSyntaxFactsServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public VBLspSyntaxFactsServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteSyntaxTreeFactoryService.cs b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteSyntaxTreeFactoryService.cs index 1b4fbee3dc00b1c58febff80743a3b8182b8a49b..96a67f228564627739d68c31601c6f59d194c977 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteSyntaxTreeFactoryService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/LocalForwarders/VBRemoteSyntaxTreeFactoryService.cs @@ -9,6 +9,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.LocalForwarde [ExportLanguageServiceFactory(typeof(ISyntaxTreeFactoryService), StringConstants.VBLspLanguageName), Shared] internal class VBLspSyntaxTreeFactoryServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public VBLspSyntaxTreeFactoryServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) { return languageServices.GetOriginalLanguageService(); diff --git a/src/VisualStudio/LiveShare/Impl/Client/RoslynLSPClientService.cs b/src/VisualStudio/LiveShare/Impl/Client/RoslynLSPClientService.cs index 4215203e31902e6a491aa1dba50b9356f63a4a09..53434a2c7f6078e627e09eacbb4a00978b9e705b 100644 --- a/src/VisualStudio/LiveShare/Impl/Client/RoslynLSPClientService.cs +++ b/src/VisualStudio/LiveShare/Impl/Client/RoslynLSPClientService.cs @@ -152,6 +152,11 @@ public void InitializeServerCapabilities(CancellationToken cancellationToken) CreationPriority = (int)ServiceRole.LocalService + 2000)] internal class CSharpLspClientServiceFactory : AbstractLspClientServiceFactory { + [ImportingConstructor] + public CSharpLspClientServiceFactory() + { + } + protected override string LanguageSpecificProviderName => StringConstants.CSharpProviderName; protected override RoslynLSPClientLifeTimeService LspClientLifeTimeService => new CSharpLSPClientLifeTimeService(); @@ -169,6 +174,11 @@ private class CSharpLSPClientLifeTimeService : RoslynLSPClientLifeTimeService CreationPriority = (int)ServiceRole.LocalService + 2000)] internal class VisualBasicLspClientServiceFactory : AbstractLspClientServiceFactory { + [ImportingConstructor] + public VisualBasicLspClientServiceFactory() + { + } + protected override string LanguageSpecificProviderName => StringConstants.VisualBasicProviderName; protected override RoslynLSPClientLifeTimeService LspClientLifeTimeService => new VisualBasicLSPClientLifeTimeService(); @@ -186,6 +196,11 @@ private class VisualBasicLSPClientLifeTimeService : RoslynLSPClientLifeTimeServi CreationPriority = (int)ServiceRole.LocalService + 2000)] internal class TypeScriptLspClientServiceFactory : AbstractLspClientServiceFactory { + [ImportingConstructor] + public TypeScriptLspClientServiceFactory() + { + } + protected override string LanguageSpecificProviderName => StringConstants.TypeScriptProviderName; protected override RoslynLSPClientLifeTimeService LspClientLifeTimeService => new TypeScriptLSPClientLifeTimeService(); diff --git a/src/VisualStudio/LiveShare/Impl/LSPSDKInitializeHandler.cs b/src/VisualStudio/LiveShare/Impl/LSPSDKInitializeHandler.cs index 3cd554f621b19144ea013bf8fced40c8a3adb40c..9f4ae4d2b3af96ae5111db6debd4f07543e30d6d 100644 --- a/src/VisualStudio/LiveShare/Impl/LSPSDKInitializeHandler.cs +++ b/src/VisualStudio/LiveShare/Impl/LSPSDKInitializeHandler.cs @@ -1,5 +1,6 @@ // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System.ComponentModel.Composition; using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis; @@ -15,6 +16,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare [ExportLspRequestHandler(LiveShareConstants.RoslynLSPSDKContractName, LSP.Methods.InitializeName)] internal class LSPSDKInitializeHandler : ILspRequestHandler { + [ImportingConstructor] + public LSPSDKInitializeHandler() + { + } + public Task HandleAsync(LSP.InitializeParams request, RequestContext requestContext, CancellationToken cancellationToken) { var result = new LSP.InitializeResult diff --git a/src/VisualStudio/LiveShare/Impl/LexicalClassificationsHandler.cs b/src/VisualStudio/LiveShare/Impl/LexicalClassificationsHandler.cs index 26f341e01d4fb1d8cfc26c77e8844120a33774be..da78d5e4824df98bcaab8e83ccb41380bbb644ed 100644 --- a/src/VisualStudio/LiveShare/Impl/LexicalClassificationsHandler.cs +++ b/src/VisualStudio/LiveShare/Impl/LexicalClassificationsHandler.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel.Composition; using System.Linq; using System.Threading; using System.Threading.Tasks; @@ -28,10 +29,18 @@ protected override async Task AddClassificationsAsync(IClassificationService cla [ExportLspRequestHandler(LiveShareConstants.CSharpContractName, LexicalClassificationsMethodName)] internal class CSharpLexicalClassificationsHandler : LexicalClassificationsHandler { + [ImportingConstructor] + public CSharpLexicalClassificationsHandler() + { + } } [ExportLspRequestHandler(LiveShareConstants.VisualBasicContractName, LexicalClassificationsMethodName)] internal class VisualBasicLexicalClassificationsHandler : LexicalClassificationsHandler { + [ImportingConstructor] + public VisualBasicLexicalClassificationsHandler() + { + } } } diff --git a/src/VisualStudio/LiveShare/Impl/LoadHandler.cs b/src/VisualStudio/LiveShare/Impl/LoadHandler.cs index 6f22a73828578468a93603e9347c83d3b9eab356..2e28c0b2c22bbeac2f1a930cfbb74a8210b877be 100644 --- a/src/VisualStudio/LiveShare/Impl/LoadHandler.cs +++ b/src/VisualStudio/LiveShare/Impl/LoadHandler.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using System.ComponentModel.Composition; using System.Threading; using System.Threading.Tasks; using Microsoft.VisualStudio.LiveShare.LanguageServices; @@ -20,20 +21,36 @@ public Task HandleAsync(object request, RequestContext requestContext, C [Obsolete("Used for backwards compatibility with old liveshare clients.")] internal class RoslynLoadHandler : LoadHandler { + [ImportingConstructor] + public RoslynLoadHandler() + { + } } [ExportLspRequestHandler(LiveShareConstants.CSharpContractName, CustomMethods.LoadName)] internal class CSharpLoadHandler : LoadHandler { + [ImportingConstructor] + public CSharpLoadHandler() + { + } } [ExportLspRequestHandler(LiveShareConstants.VisualBasicContractName, CustomMethods.LoadName)] internal class VisualBasicLoadHandler : LoadHandler { + [ImportingConstructor] + public VisualBasicLoadHandler() + { + } } [ExportLspRequestHandler(LiveShareConstants.TypeScriptContractName, CustomMethods.LoadName)] internal class TypeScriptLoadHandler : LoadHandler { + [ImportingConstructor] + public TypeScriptLoadHandler() + { + } } } diff --git a/src/VisualStudio/LiveShare/Impl/ProjectsHandler.Exports.cs b/src/VisualStudio/LiveShare/Impl/ProjectsHandler.Exports.cs index f143ab7e86d8261dbb0ccfb500ce8c3f41072a97..954eaec9f8376c11a1ec4f22937138d036983cfb 100644 --- a/src/VisualStudio/LiveShare/Impl/ProjectsHandler.Exports.cs +++ b/src/VisualStudio/LiveShare/Impl/ProjectsHandler.Exports.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using System.ComponentModel.Composition; using Microsoft.VisualStudio.LanguageServices.LiveShare.CustomProtocol; using Microsoft.VisualStudio.LiveShare.LanguageServices; @@ -10,20 +11,36 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare [Obsolete("Used for backwards compatibility with old liveshare clients.")] internal class RoslynProjectsHandler : ProjectsHandler { + [ImportingConstructor] + public RoslynProjectsHandler() + { + } } [ExportLspRequestHandler(LiveShareConstants.CSharpContractName, RoslynMethods.ProjectsName)] internal class CSharpProjectsHandler : ProjectsHandler { + [ImportingConstructor] + public CSharpProjectsHandler() + { + } } [ExportLspRequestHandler(LiveShareConstants.VisualBasicContractName, RoslynMethods.ProjectsName)] internal class VisualBasicProjectsHandler : ProjectsHandler { + [ImportingConstructor] + public VisualBasicProjectsHandler() + { + } } [ExportLspRequestHandler(LiveShareConstants.TypeScriptContractName, RoslynMethods.ProjectsName)] internal class TypeScriptProjectsHandler : ProjectsHandler { + [ImportingConstructor] + public TypeScriptProjectsHandler() + { + } } } diff --git a/src/VisualStudio/LiveShare/Impl/SyntaxClassificationsHandler.cs b/src/VisualStudio/LiveShare/Impl/SyntaxClassificationsHandler.cs index 53774cef018d2b44cfa8094d3846f14679572f4b..65792efe7581ec16c26a94e49b9572e6502d1deb 100644 --- a/src/VisualStudio/LiveShare/Impl/SyntaxClassificationsHandler.cs +++ b/src/VisualStudio/LiveShare/Impl/SyntaxClassificationsHandler.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel.Composition; using System.Linq; using System.Threading; using System.Threading.Tasks; @@ -27,10 +28,18 @@ protected override async Task AddClassificationsAsync(IClassificationService cla [ExportLspRequestHandler(LiveShareConstants.CSharpContractName, SyntaxClassificationsMethodName)] internal class CSharpSyntaxClassificationsHandler : SyntaxClassificationsHandler { + [ImportingConstructor] + public CSharpSyntaxClassificationsHandler() + { + } } [ExportLspRequestHandler(LiveShareConstants.VisualBasicContractName, SyntaxClassificationsMethodName)] internal class VisualBasicSyntaxClassificationsHandler : SyntaxClassificationsHandler { + [ImportingConstructor] + public VisualBasicSyntaxClassificationsHandler() + { + } } } diff --git a/src/VisualStudio/LiveShare/Test/MockDocumentNavigationServiceFactory.cs b/src/VisualStudio/LiveShare/Test/MockDocumentNavigationServiceFactory.cs index e4aae6120248e835f7fe4949422881991fdacfd5..d6ff0ac5f5c8e17f1748f7107de7df594eeef565 100644 --- a/src/VisualStudio/LiveShare/Test/MockDocumentNavigationServiceFactory.cs +++ b/src/VisualStudio/LiveShare/Test/MockDocumentNavigationServiceFactory.cs @@ -15,6 +15,11 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.UnitTests [PartNotDiscoverable] internal class MockDocumentNavigationServiceFactory : IWorkspaceServiceFactory { + [ImportingConstructor] + public MockDocumentNavigationServiceFactory() + { + } + public IWorkspaceService CreateService(HostWorkspaceServices workspaceServices) { return new MockDocumentNavigationService(); diff --git a/src/VisualStudio/TestUtilities2/VisualStudioTestExportProvider.vb b/src/VisualStudio/TestUtilities2/VisualStudioTestExportProvider.vb index 9f179b40304b5e54300206a5633a4141d95ef889..efc83520a768ef856383d383e3f3b4f838f2b640 100644 --- a/src/VisualStudio/TestUtilities2/VisualStudioTestExportProvider.vb +++ b/src/VisualStudio/TestUtilities2/VisualStudioTestExportProvider.vb @@ -1,5 +1,6 @@ ' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +Imports System.Composition Imports Microsoft.CodeAnalysis.Test.Utilities Imports Microsoft.VisualStudio.Composition Imports Microsoft.VisualStudio.LanguageServices.CSharp.CodeModel @@ -26,6 +27,11 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests Friend Class MockWorkspaceEventListenerProvider Implements IWorkspaceServiceFactory + + + Public Sub New() + End Sub + Public Function CreateService(workspaceServices As HostWorkspaceServices) As IWorkspaceService Implements IWorkspaceServiceFactory.CreateService Return Nothing End Function diff --git a/src/VisualStudio/VisualBasic/Impl/ProjectSystemShim/VisualBasicProjectExistsUIContextProviderLanguageService.vb b/src/VisualStudio/VisualBasic/Impl/ProjectSystemShim/VisualBasicProjectExistsUIContextProviderLanguageService.vb index 8a9245bd0d45afeb81f235fa39470a02acbfacbe..1103ca758e2302909f1d9e9b7a2508490e06ca7d 100644 --- a/src/VisualStudio/VisualBasic/Impl/ProjectSystemShim/VisualBasicProjectExistsUIContextProviderLanguageService.vb +++ b/src/VisualStudio/VisualBasic/Impl/ProjectSystemShim/VisualBasicProjectExistsUIContextProviderLanguageService.vb @@ -11,6 +11,10 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.ProjectSystemShim Public Class VisualBasicProjectExistsUIContextProviderLanguageService Implements IProjectExistsUIContextProviderLanguageService + + Public Sub New() + End Sub + Public Function GetUIContext() As UIContext Implements IProjectExistsUIContextProviderLanguageService.GetUIContext Return UIContext.FromUIContextGuid(Guids.VisualBasicProjectExistsInWorkspaceUIContext) End Function diff --git a/src/Workspaces/CSharp/Portable/LanguageServices/CSharpSyntaxKindsServiceFactory.cs b/src/Workspaces/CSharp/Portable/LanguageServices/CSharpSyntaxKindsServiceFactory.cs index b29569af5620fa1631b431c9db855900bfafb4d2..4f2e768a565272121a20e0c2afb0d9baf4f93667 100644 --- a/src/Workspaces/CSharp/Portable/LanguageServices/CSharpSyntaxKindsServiceFactory.cs +++ b/src/Workspaces/CSharp/Portable/LanguageServices/CSharpSyntaxKindsServiceFactory.cs @@ -11,6 +11,11 @@ namespace Microsoft.CodeAnalysis.CSharp [ExportLanguageServiceFactory(typeof(ISyntaxKindsService), LanguageNames.CSharp), Shared] internal class CSharpSyntaxKindsServiceFactory : ILanguageServiceFactory { + [ImportingConstructor] + public CSharpSyntaxKindsServiceFactory() + { + } + public ILanguageService CreateLanguageService(HostLanguageServices languageServices) => CSharpSyntaxKindsService.Instance; } diff --git a/src/Workspaces/Core/Portable/ExternalAccess/Pythia/Api/PythiaOptions.cs b/src/Workspaces/Core/Portable/ExternalAccess/Pythia/Api/PythiaOptions.cs index c9a8a38274315911d99b5a46ec080efddda2603f..722e4a9c779be34bb3a18591ec0a8e0a0dc4183b 100644 --- a/src/Workspaces/Core/Portable/ExternalAccess/Pythia/Api/PythiaOptions.cs +++ b/src/Workspaces/Core/Portable/ExternalAccess/Pythia/Api/PythiaOptions.cs @@ -23,6 +23,11 @@ internal static class PythiaOptions [ExportOptionProvider, Shared] internal class PythiaOptionsProvider : IOptionProvider { + [ImportingConstructor] + public PythiaOptionsProvider() + { + } + public ImmutableArray Options { get; } = ImmutableArray.Create( PythiaOptions.ShowDebugInfo, diff --git a/src/Workspaces/Remote/Core/Services/RemoteExperimentationService.cs b/src/Workspaces/Remote/Core/Services/RemoteExperimentationService.cs index bcf869c2dca340b06e61c94da2e2e8f8ab079c55..622c46a137c2fc00c40a06b081ff9dced8123f7e 100644 --- a/src/Workspaces/Remote/Core/Services/RemoteExperimentationService.cs +++ b/src/Workspaces/Remote/Core/Services/RemoteExperimentationService.cs @@ -10,6 +10,11 @@ namespace Microsoft.CodeAnalysis.Remote.Services [ExportWorkspaceService(typeof(IExperimentationService), ServiceLayer.Host), Shared] internal sealed class RemoteExperimentationService : IExperimentationService { + [ImportingConstructor] + public RemoteExperimentationService() + { + } + public bool IsExperimentEnabled(string experimentName) { var assetSource = AssetStorage.Default.AssetSource; diff --git a/src/Workspaces/Remote/Core/Storage/RemotePersistentStorageLocationService.cs b/src/Workspaces/Remote/Core/Storage/RemotePersistentStorageLocationService.cs index 955216857dbdb47a5c53500082ea92061706e691..5cdb23653b8b28814ad4ed69d898ff8c444ef91d 100644 --- a/src/Workspaces/Remote/Core/Storage/RemotePersistentStorageLocationService.cs +++ b/src/Workspaces/Remote/Core/Storage/RemotePersistentStorageLocationService.cs @@ -10,12 +10,22 @@ namespace Microsoft.CodeAnalysis.Remote.Storage [ExportWorkspaceService(typeof(IPersistentStorageLocationService), layer: WorkspaceKind.RemoteWorkspace), Shared] internal class RemoteWorkspacePersistentStorageLocationService : DefaultPersistentStorageLocationService { + [ImportingConstructor] + public RemoteWorkspacePersistentStorageLocationService() + { + } + public override bool IsSupported(Workspace workspace) => true; } [ExportWorkspaceService(typeof(IPersistentStorageLocationService), layer: WorkspaceKind.RemoteTemporaryWorkspace), Shared] internal class RemoteTemporaryWorkspacePersistentStorageLocationService : DefaultPersistentStorageLocationService { + [ImportingConstructor] + public RemoteTemporaryWorkspacePersistentStorageLocationService() + { + } + public override bool IsSupported(Workspace workspace) => true; } } diff --git a/src/Workspaces/VisualBasic/Portable/LanguageServices/VisualBasicSyntaxKindsServiceFactory.vb b/src/Workspaces/VisualBasic/Portable/LanguageServices/VisualBasicSyntaxKindsServiceFactory.vb index dfafd5e7e8381c0faa92f6a111803215ed9b0aa9..9fb3d98649e4e6c98aae56c8b3ab5ebae7e388c9 100644 --- a/src/Workspaces/VisualBasic/Portable/LanguageServices/VisualBasicSyntaxKindsServiceFactory.vb +++ b/src/Workspaces/VisualBasic/Portable/LanguageServices/VisualBasicSyntaxKindsServiceFactory.vb @@ -11,6 +11,10 @@ Namespace Microsoft.CodeAnalysis.VisualBasic Friend Class VisualBasicSyntaxKindsServiceFactory Implements ILanguageServiceFactory + + Public Sub New() + End Sub + Public Function CreateLanguageService(languageServices As HostLanguageServices) As ILanguageService Implements ILanguageServiceFactory.CreateLanguageService Return VisualBasicSyntaxKindsService.Instance End Function