Closed AArnott closed 7 months ago
Also note that that even if the proxy interface derives from IDisposable
, the analyzer doesn't recognize a simple using
clause referring to the proxy interface as disposing the proxy.
This causes the analyzer to mis-fire:
interface IMyInterface : IDisposable { ... }
var myInterface = await isb.GetProxyAsync(...);
using (myInterface)
{
}
This does not:
interface IMyInterface : IDisposable { ... }
var myInterface = await isb.GetProxyAsync(...);
using (myInterface as IDisposable)
{
}
This works:
But this syntax leads the analyzer to mis-fire: