GotoDefinitionWithFindUsagesServiceHandler.Exports.cs 1.7 KB
Newer Older
J
Jonathon Marolf 已提交
1 2 3
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
4

D
David Barbet 已提交
5
using System;
6
using System.ComponentModel.Composition;
7
using Microsoft.CodeAnalysis.Host.Mef;
8
using Microsoft.CodeAnalysis.LanguageServer;
9
using Microsoft.CodeAnalysis.MetadataAsSource;
10
using Microsoft.VisualStudio.LanguageServer.Protocol;
D
David Barbet 已提交
11
using Microsoft.VisualStudio.LiveShare.LanguageServices;
12 13 14 15 16

namespace Microsoft.VisualStudio.LanguageServices.LiveShare
{
    [ExportLspRequestHandler(LiveShareConstants.RoslynContractName, Methods.TextDocumentDefinitionName)]
    [Obsolete("Used for backwards compatibility with old liveshare clients.")]
D
David Barbet 已提交
17
    internal class RoslynGoToDefinitionHandler : AbstractGoToDefinitionWithFindUsagesServiceHandler
18 19
    {
        [ImportingConstructor]
20
        [Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
21 22
        public RoslynGoToDefinitionHandler([Import(AllowDefault = true)] IMetadataAsSourceFileService metadataAsSourceService,
            ILspSolutionProvider solutionProvider) : base(metadataAsSourceService, solutionProvider)
23 24 25 26 27
        {
        }
    }

    [ExportLspRequestHandler(LiveShareConstants.TypeScriptContractName, Methods.TextDocumentDefinitionName)]
D
David Barbet 已提交
28
    internal class TypeScriptGoToDefinitionHandler : AbstractGoToDefinitionWithFindUsagesServiceHandler
29 30
    {
        [ImportingConstructor]
31
        [Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
32
        public TypeScriptGoToDefinitionHandler(ILspSolutionProvider solutionProvider) : base(null, solutionProvider)
33 34 35 36
        {
        }
    }
}