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

Mark HaveIBeenPwnedClientSettings as sealed #29

Closed akamsteeg closed 4 years ago

akamsteeg commented 5 years ago

Right now HaveIBeenPwnedClientSettings is not a sealed class, but HaveIBeenPwnedClient is: https://github.com/akamsteeg/AtleX.HaveIBeenPwned/blob/0310a2876b6e5cac99ccd3752f983350494a5c58/src/AtleX.HaveIBeenPwned/HaveIBeenPwnedClientSettings.cs#L11

We 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 a HaveIBeenPwnedClientSettings to the wrapped HaveIBeenPwnedClient as they see fit.

This is a breaking change because sealing a class might break any implementations that extend it.

akamsteeg commented 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?

akamsteeg commented 4 years ago

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.