Example #1
0
 public static R GetOrDefault <T, R>(this TryGet <T> tryGet, R def)
     where T : R
 {
     if (tryGet.Succeeded)
     {
         return(tryGet.Value);
     }
     return(def);
 }
Example #2
0
 public bool Equals(TryGet <T> other)
 {
     return(Succeeded == other.Succeeded &&
            Equals(Value, other.Value));
 }