ExternalAnnotations icon indicating copy to clipboard operation
ExternalAnnotations copied to clipboard

Add "MeansImplicitUse" for HttpClientJsonExtensions.GetFromJsonAsync``1

Open sirduke opened this issue 3 years ago • 0 comments

using System.Net.Http;
using System.Net.Http.Json;
using System.Threading.Tasks;

public class C
{
    private readonly HttpClient _httpClient = new();

    public async Task GetResult()
    {
        var response = await _httpClient.GetFromJsonAsync<MyObject>(new Uri(""));
    }

    private class MyObject {} // should not show warning "class is never instantiated
}

sirduke avatar Feb 25 '22 11:02 sirduke