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