зеркало из https://github.com/dotnet/razor.git
React to changes in master branch
This commit is contained in:
Родитель
aaf9b82e54
Коммит
088abb1f0e
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче