Many core models are IAsyncDisposable, even in situations where it isn't needed (such as ICoreImage)
Solution
Only the root ICore instance needs to be disposable. This instance is passed to every other model spawned from ICore, meaning that just having IAsyncInit and IAsyncDisposable on ICore should cover all service setup and teardown scenarios that these models might need. The models themselves don't need to be disposable.
Remove IAsyncDisposable from all models except ICore.
Problem
Many core models are
IAsyncDisposable
, even in situations where it isn't needed (such asICoreImage
)Solution
Only the root ICore instance needs to be disposable. This instance is passed to every other model spawned from
ICore
, meaning that just havingIAsyncInit
andIAsyncDisposable
onICore
should cover all service setup and teardown scenarios that these models might need. The models themselves don't need to be disposable.Remove
IAsyncDisposable
from all models exceptICore
.