U:调整所有代码格式
This commit is contained in:
1 parent
d133bacf55
commit
155b67e831
342 files changed
+9431
-9868
No files matched your search
@@ -18,15 +18,21 @@ public sealed class TestHttpMessageHandler : HttpMessageHandler
|
||||
_handler = handler;
|
||||
}
|
||||
|
||||
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
|
||||
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
Interlocked.Increment(ref _calls);
|
||||
return await _handler(request);
|
||||
}
|
||||
|
||||
public static HttpResponseMessage Json(HttpStatusCode code, string json)
|
||||
=> new(code) { Content = new StringContent(json, System.Text.Encoding.UTF8, "application/json") };
|
||||
{
|
||||
return new HttpResponseMessage(code)
|
||||
{ Content = new StringContent(json, System.Text.Encoding.UTF8, "application/json") };
|
||||
}
|
||||
|
||||
public static HttpResponseMessage Text(HttpStatusCode code, string text)
|
||||
=> new(code) { Content = new StringContent(text) };
|
||||
}
|
||||
{
|
||||
return new HttpResponseMessage(code) { Content = new StringContent(text) };
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user