AbstractRequestHandler.cs 926 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

#nullable enable

using System.Threading;
using System.Threading.Tasks;
using Microsoft.VisualStudio.LanguageServer.Protocol;

namespace Microsoft.CodeAnalysis.LanguageServer.Handler
{
D
David Barbet 已提交
13
    internal abstract class AbstractRequestHandler<RequestType, ResponseType> : IRequestHandler<RequestType, ResponseType>
14 15 16
    {
        protected readonly ILspSolutionProvider SolutionProvider;

D
David Barbet 已提交
17
        protected AbstractRequestHandler(ILspSolutionProvider solutionProvider)
18 19 20 21 22 23 24
        {
            SolutionProvider = solutionProvider;
        }

        public abstract Task<ResponseType> HandleRequestAsync(RequestType request, ClientCapabilities clientCapabilities, string? clientName, CancellationToken cancellationToken);
    }
}