Currently, in v2.*, IHaveIBeenPwnedClient extends IDisposable. That's not desirable, because it forces any implementation of a custom client to implement the dispose logic too and some might not need it. We can safely remove the interface (it's breaking, so major version bump), and in HaveIBeenPwnedClient.Dispose(bool) only dispose the used IHaveBeenPwnedClient when it's disposable.
Example:
protected override void Dispose(bool disposing)
{
if (disposing && this._serviceClient is IDisposable disposableClient)
{
disposableClient.Dispose();
}
}
Currently, in v2.*,
IHaveIBeenPwnedClient
extendsIDisposable
. That's not desirable, because it forces any implementation of a custom client to implement the dispose logic too and some might not need it. We can safely remove the interface (it's breaking, so major version bump), and inHaveIBeenPwnedClient.Dispose(bool)
only dispose the usedIHaveBeenPwnedClient
when it's disposable.Example: