XaveScor
XaveScor

Reputation: 113

How corefx works with HttpMessageHandler?

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

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);

How to call protected method?

Upvotes: 0

Views: 249

Answers (1)

Ilya Chumakov
Ilya Chumakov

Reputation: 25039

It's not protected. It's protected internal. Which means "protected OR internal". This method can be called by any code in the same assembly.

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

Upvotes: 1

Related Questions