コード例 #1
0
ファイル: Cell.cs プロジェクト: CeleriedAway/ZergRush
 public static ICell <T2> FlatMapWithDefaultOnNull <T, T2>(this ICell <T> cell, Func <T, ICell <T2> > map, T2 defaultValue)
     where T : class
 {
     return(cell.FlatMap(v => v != null ? map(v) : new StaticCell <T2>(defaultValue)));
 }
コード例 #2
0
ファイル: Cell.cs プロジェクト: CeleriedAway/ZergRush
 public static IEventStream <T2> FlatMapWithDefaultOnNull <T, T2>(this ICell <T> cell, Func <T, IEventStream <T2> > map)
     where T : class
 {
     return(cell.FlatMap(v => v != null ? map(v) : AbandonedStream <T2> .value));
 }
コード例 #3
0
ファイル: Cell.cs プロジェクト: CeleriedAway/ZergRush
 public static ICell <T2> FlatMapWithDefaultOnNull <T, T2>(this ICell <T> cell, Func <T, ICell <T2> > map)
     where T : class
 {
     return(cell.FlatMap(v => v != null ? map(v) : StaticCell <T2> .Default()));
 }