skwasjer / IbanNet

C# .NET IBAN validator, parser, builder and generator
Apache License 2.0
119 stars 31 forks source link

Add support for `IParseable<T>` (or `ISpanParseable<T>`) #133

Closed skwasjer closed 11 months ago

skwasjer commented 1 year ago

Is your feature request related to a problem? Please describe. N/A

Describe the solution you'd like With C# 11 we can use static interface members and with these specific .NET 7+ interfaces, it would provide parsing that is consistent with the built-in primitives.

See https://learn.microsoft.com/en-us/dotnet/api/system.iparsable-1

Before 59023a8bc82585719f8bcc9f3ebc7527b8ac36ad the Iban type actually had static Iban.Parse and Iban.TryParse members, but was this moved to the IIbanParser abstraction a few years ago. Proposal is to bring back the static members to the Iban type and remove the IIbanParser abstraction.

This is a breaking change!

Some issues to deal with:

Describe alternatives you've considered N/A

Additional context N/A

skwasjer commented 11 months ago

Individual tasks are tracked in #148