Added HasValue and ifSome/None, and Member not null; for Option.Value
All checks were successful
Build NuGet / build (push) Successful in 40s
All checks were successful
Build NuGet / build (push) Successful in 40s
This commit is contained in:
@@ -20,6 +20,7 @@ public readonly struct Option<T> : IOption<T>,
|
||||
public T? Value => _value;
|
||||
|
||||
[MemberNotNullWhen(true, nameof(HasValue), nameof(_value))]
|
||||
[MemberNotNullWhen(true, nameof(HasValue), nameof(Value))]
|
||||
public bool HasValue {get;init;}
|
||||
|
||||
public static Option<T> Some(T value) => new Option<T>(value, true);
|
||||
|
||||
Reference in New Issue
Block a user