Beispiel #1
0
 public virtual Option <C> CIfPresent() => Alg.None <C>();
Beispiel #2
0
 public virtual Option <A> AIfPresent() => Alg.None <A>();
Beispiel #3
0
 public virtual Option <B> BIfPresent() => Alg.None <B>();
Beispiel #4
0
 public Option <I3> I3IfPresent() => (mWhich == 3) ? Alg.Some <I3>((I3)mData) : Alg.None <I3>();
Beispiel #5
0
 public Option <I2> I2IfPresent() => (mWhich == 2) ? Alg.Some <I2>((I2)mData) : Alg.None <I2>();
Beispiel #6
0
 public Option <I1> I1IfPresent() => (mWhich == 1) ? Alg.Some <I1>((I1)mData) : Alg.None <I1>();
Beispiel #7
0
 public Option <I0> I0IfPresent() => (mWhich == 0) ? Alg.Some <I0>((I0)mData) : Alg.None <I0>();
Beispiel #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>());
 }