Closed akamsteeg closed 4 years ago
On the other hand, not sealing it allows people to extend it and then pass it along if they wrap HaveIBeenPwnedClient
. Maybe it's a better idea to leave it unsealed?
I'm not going to seal this one. It serves no purpose to seal it and unsealed it's a nice extension point to inherit from it for custom clients.
Right now
HaveIBeenPwnedClientSettings
is not a sealed class, butHaveIBeenPwnedClient
is: https://github.com/akamsteeg/AtleX.HaveIBeenPwned/blob/0310a2876b6e5cac99ccd3752f983350494a5c58/src/AtleX.HaveIBeenPwned/HaveIBeenPwnedClientSettings.cs#L11We should seal it because it's only valid for
HaveIBeenPwnedClient
. If people want to wrap it's better to create their own settings class and pass along aHaveIBeenPwnedClientSettings
to the wrappedHaveIBeenPwnedClient
as they see fit.This is a breaking change because sealing a class might break any implementations that extend it.