React to changes in master branch

This commit is contained in:
N. Taylor Mullen 2020-03-23 12:58:22 -07:00
Родитель aaf9b82e54
Коммит 088abb1f0e
3 изменённых файлов: 20 добавлений и 3 удалений

Просмотреть файл

@ -57,7 +57,7 @@ namespace Microsoft.VisualStudio.LanguageServerClient.Razor.HtmlCSharp
Methods.TextDocumentCompletionResolveName,
resolveData.LanguageServerKind,
request,
cancellationToken);
cancellationToken).ConfigureAwait(false);
return result;
}

Просмотреть файл

@ -44,7 +44,7 @@ namespace Microsoft.VisualStudio.LanguageServerClient.Razor.HtmlCSharp
var handler = new CompletionResolveHandler(requestInvoker.Object);
// Act
var result = await handler.HandleRequestAsync(request, new ClientCapabilities(), CancellationToken.None);
var result = await handler.HandleRequestAsync(request, new ClientCapabilities(), CancellationToken.None).ConfigureAwait(false);
// Assert
Assert.True(called);
@ -67,7 +67,7 @@ namespace Microsoft.VisualStudio.LanguageServerClient.Razor.HtmlCSharp
var handler = new CompletionResolveHandler(requestInvoker.Object);
// Act
var result = await handler.HandleRequestAsync(request, new ClientCapabilities(), CancellationToken.None);
var result = await handler.HandleRequestAsync(request, new ClientCapabilities(), CancellationToken.None).ConfigureAwait(false);
// Assert (Does not throw with MockBehavior.Strict)
Assert.Equal("div", result.InsertText);

Просмотреть файл

@ -88,6 +88,23 @@ namespace Microsoft.VisualStudio.LanguageServerClient.Razor.HtmlCSharp
{
throw new NotImplementedException();
}
#pragma warning disable CA1801 // Parameter is never used
public Task<(ILanguageClient, JToken)> RequestAsync(
string[] contentTypes,
Func<JToken, bool> capabilitiesFilter,
string method,
JToken parameters,
CancellationToken cancellationToken)
{
// We except it to be called with only one content type.
var contentType = Assert.Single(contentTypes);
_callback?.Invoke(contentType, method);
return Task.FromResult<(ILanguageClient, JToken)>((null, null));
}
#pragma warning restore CA1801 // Parameter is never used
}
}
}