corefx如何与HttpMessageHandler一起使用?

问题描述:

https://github.com/dotnet/corefx/blob/master/src/System.Net.Http/src/System/Net/Http/HttpMessageHandler.cs#L20corefx如何与HttpMessageHandler一起使用?

protected internal abstract Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken); 

https://github.com/dotnet/corefx/blob/master/src/System.Net.Http/src/System/Net/Http/HttpMessageInvoker.cs#L51

Task<HttpResponseMessage> task = _handler.SendAsync(request, cancellationToken); 

如何调用保护方法?

这不是protected。它是protected internal。这意味着“protectedinternal”。该方法可以由同一个程序集中的任何代码调用。

What is the difference between 'protected' and 'protected internal'?