Skip to content

v3.0.0

Choose a tag to compare

@github-actions github-actions released this 05 Dec 07:36
· 391 commits to main since this release
ce0805f

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.