4.0.0
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.
- Net8 by @SteveDunn in #556
- Add IParsable and Parse/TryParse hoisting by @SteveDunn in #570
- Update README.md by @ronnieoverby in #569
- chore(deps): bump actions/configure-pages from 4 to 5 by @dependabot in #567
New Contributors
- @ronnieoverby made their first contribution in #569
Full Changelog: 3.0.24...4.0.0