JetBrains / ExternalAnnotations

JetBrains ReSharper External Annotations
https://www.jetbrains.com/help/resharper/Code_Analysis__External_Annotations.html
MIT License
81 stars 44 forks source link

Add "MeansImplicitUse" for HttpClientJsonExtensions.GetFromJsonAsync``1 #229

Closed sirduke closed 1 year ago

sirduke commented 2 years ago

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
}