Skip to content

1.0.0-beta.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@thomaslevesque thomaslevesque released this 13 Sep 11:56
· 10 commits to master since this release
05db7a3

New

  • Added support for C# 8 nullable reference types

Changed

  • Replaced GetValueOrDefault with 3 new methods to better support nullability analysis.
    • ValueOrDefault<T>() where T : struct: returns the option's value, or default(T) if the option is None
    • ValueOrNull<T>() where T : class?: returns the option's value, or null if the option is None
    • ValueOr<T>(T defaultValue): returns the option's value, or defaultValue if the option is None