IDISP013 triggers in the following situation:
private async Task IDISP013()
{
using var client = new HttpClient();
Func<Task<HttpResponseMessage>> f = () => client.GetAsync("");
// ^^^^^^^^^^^^^^^^^^^ Await in using
await f();
}
I believe this to be a false positive, as f is executed within the scope of the using. -- When f wasn't awaited I can see there being an issue where client would've been disposed before GetAsync finished.
IDISP013 triggers in the following situation:
I believe this to be a false positive, as
fis executed within the scope of theusing. -- Whenfwasn't awaited I can see there being an issue whereclientwould've been disposed beforeGetAsyncfinished.