-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert new abstract method (breaking change) (#215)
The focus of these changes is to revert the breaking change in Singleton where a new abstract OnCreateAsync overload was added. Doing so required trade-offs which were not ideal. To ensure that callers build against older versions of the AMQP library could continue to function, the new overload `"OnCreateAsync(TimeSpan, CancellationToken)` is now forwarding to the legacy overload `OnCreateAsync(TimeSpan)` and will silently ignore the cancellation token. Because we cannot be sure which `OnCreateAsync` overload derived classes are calling, both have been marked `virtual` rather than any `abstract`; this required having the legacy overload throw when not implemented, since that is the target of delegation. The defined derived classes `FaultTolerantAmqpObject` and `AmqpCbsLink` have been adjusted to implement both overrides, with the legacy overload calling into the new overload with `CancellationToken.None` specified. This is intended to ensure that callers bound to older versions continue to work.
- Loading branch information
Showing
3 changed files
with
27 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters