Skip to content

4.0.0

Compare
Choose a tag to compare
@SteveDunn SteveDunn released this 19 Apr 06:32
· 366 commits to main since this release

What's Changed

The main change in this release is hoisting of parsing functionality from the primitive to the wrapper. If the primitive being wrapped implements IParsable<TSelf> (or ISpanParsable / IUtf8SpanParsable), then the wrapper will also implement these interfaces and delegate to the primitive.

Additionally, value objects of string now implement IParsable. This is useful in a number of situations. for instance, using a value object as a parameter in an ASP.NET Core endpoint.

Note that there is a potential breaking change in this version, hence the updated major version. I'd guess that the impact will be pretty low though. Previously, Vogen hoisted TryParse from the primitive. When you called TryParse on the wrapper, it would throw an exception if the value failed your Validate method. With hindsight, it should've just returned false, which it now does in this version.

New Contributors

Full Changelog: 3.0.24...4.0.0