示例#1
0
 internal static T GetValueOrDefault <T>(this ValueSource <Optional <T> > optional, CancellationToken cancellationToken = default) where T : struct
 => optional.GetValue(cancellationToken).GetValueOrDefault();
示例#2
0
 internal static T?GetValueOrNull <T>(this ValueSource <Optional <T> > optional, CancellationToken cancellationToken = default) where T : class
 => optional.GetValue(cancellationToken).GetValueOrNull();