akamsteeg / AtleX.HaveIBeenPwned

A fully async .NET Standard client library for the API of HaveIBeenPwned.com
https://www.nuget.org/packages/AtleX.HaveIBeenPwned/
MIT License
5 stars 0 forks source link

Remove methods without cancellation token parameters from (I)HaveIBeenPwnedClient #66

Open akamsteeg opened 2 years ago

akamsteeg commented 2 years ago

(Related: https://github.com/akamsteeg/AtleX.HaveIBeenPwned/issues/65)

In V6, all public methods in HaveIBeenPwnedClient have two versions: One with a CancellationToken and one without. In the modern .NET world, there's a big push to either requiring cancellation tokens (or a explicit CancellationToken.None when cancelling is not important) or have an optional parameter with the cancellation token with a default value.

I prefer being as explicit in code as possible so in #65 we already marked the methods without a CancellationToken with an ObsoleteAttribute. In vFuture, we remove the methods without a cancellation token.