예제 #1
0
파일: Union.cs 프로젝트: Texl/txl--diamond
 public virtual Option <C> CIfPresent() => Alg.None <C>();
예제 #2
0
파일: Union.cs 프로젝트: Texl/txl--diamond
 public virtual Option <A> AIfPresent() => Alg.None <A>();
예제 #3
0
파일: Union.cs 프로젝트: Texl/txl--diamond
 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>());
 }