private async Task <LanguageServerHelper> StartServerWithClientConnectionAsync(MultipleMessageListener <PublishDiagnosticsParams> diagsListener)
        {
            var fileSystemDict = new Dictionary <Uri, string>();
            var fileResolver   = new InMemoryFileResolver(fileSystemDict);
            var serverOptions  = new Server.CreationOptions(FileResolver: fileResolver);

            return(await LanguageServerHelper.StartServerWithClientConnectionAsync(
                       TestContext,
                       options =>
            {
                options.OnPublishDiagnostics(diags => diagsListener.AddMessage(diags));
            },
                       serverOptions));
        }
Beispiel #2
0
        private async Task <(ILanguageClient, MultipleMessageListener <PublishDiagnosticsParams>, string testOutputPath)> StartServerWithClientConnectionAsync()
        {
            var fileSystemDict = new Dictionary <Uri, string>();
            var fileResolver   = new InMemoryFileResolver(fileSystemDict);
            var diagsListener  = new MultipleMessageListener <PublishDiagnosticsParams>();
            var serverOptions  = new Server.CreationOptions(FileResolver: fileResolver);
            var client         = await IntegrationTestHelper.StartServerWithClientConnectionAsync(
                TestContext,
                options =>
            {
                options.OnPublishDiagnostics(diags => diagsListener.AddMessage(diags));
            },
                serverOptions);

            var testOutputPath = Path.Combine(TestContext.ResultsDirectory, Guid.NewGuid().ToString());

            return(client, diagsListener, testOutputPath);
        }