You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Changed
Breaking: Providers and the built-in data sources are both IDisposable and IAsyncDisposable, so a provider in a DI container that is disposed synchronously, such as with using var serviceProvider = services.BuildServiceProvider();, no longer throws. ICollectionProvider<TItem, TCollection> gains IDisposable, so a class that implements it must add Dispose(); BaseCollectionProvider gains Dispose() and a virtual DisposeCore(), so a subclass that overrides DisposeAsyncCore() must also override DisposeCore(), or its own resources are released by DisposeAsync() only. IAsyncDisposableCollectionDataSource<T> is removed, and IDisposableCollectionDataSource<T> is both IDisposable and IAsyncDisposable: CreateStatic, CreateComposite and CreatePeriodicPolling return it, as CreateObservable does, so register a created source with services.AddSingleton<ICollectionDataSource<T>>(dataSource). Dispose() never waits: the polling source cancels its loop and returns, and an owned source that is only IAsyncDisposable is disposed by DisposeAsync() alone, since Dispose() disposes everything else and then throws InvalidOperationException for it. DisposeAsync() disposes what it did before (#115, ADR-1022). The change departs from the template's ADR-0136 deprecate-then-remove rule, as ADR-1002 did, so the release is 3.0.0.