Esempio n. 1
0
 public virtual Option <C> CIfPresent() => Alg.None <C>();
Esempio n. 2
0
 public virtual Option <A> AIfPresent() => Alg.None <A>();
Esempio n. 3
0
 public virtual Option <B> BIfPresent() => Alg.None <B>();
Esempio n. 4
0
 public Option <I3> I3IfPresent() => (mWhich == 3) ? Alg.Some <I3>((I3)mData) : Alg.None <I3>();
Esempio n. 5
0
 public Option <I2> I2IfPresent() => (mWhich == 2) ? Alg.Some <I2>((I2)mData) : Alg.None <I2>();
Esempio n. 6
0
 public Option <I1> I1IfPresent() => (mWhich == 1) ? Alg.Some <I1>((I1)mData) : Alg.None <I1>();
Esempio n. 7
0
 public Option <I0> I0IfPresent() => (mWhich == 0) ? Alg.Some <I0>((I0)mData) : Alg.None <I0>();
Esempio n. 8
0
 public static Option <Value> GetValueIfPresent <Key, Value>(this Dictionary <Key, Value> dictionary, Key key)
 {
     return((dictionary.TryGetValue(key, out var r))
     ? Alg.Some(r)
     : Alg.None <Value>());
 }