Esempio n. 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);
 }
Esempio n. 2
0
 public bool Equals(TryGet <T> other)
 {
     return(Succeeded == other.Succeeded &&
            Equals(Value, other.Value));
 }