コード例 #1
0
 private TResult GetRightResult(TRight right)
 => _resultSelector.Invoke(JoinOption.None <TLeft>(), JoinOption.Some(right));
コード例 #2
0
 private TResult GetResult(TLeft left, TRight right)
 => _resultSelector.Invoke(JoinOption.Some(left), JoinOption.Some(right));
コード例 #3
0
 private TResult GetLeftResult(TLeft left)
 => _resultSelector.Invoke(JoinOption.Some(left), JoinOption.None <TRight>());
コード例 #4
0
 public static IEnumerable <TResult> OuterExcludingJoin <TLeft, TRight, TKey, TResult>(this IEnumerable <TLeft> source, IEnumerable <TRight> join, Func <TLeft, TKey> leftKeySelector, Func <TRight, TKey> rightKeySelector, Func <JoinOption <TLeft>, JoinOption <TRight>, TResult> resultSelector)
 => source.LeftExcludingJoin(join, leftKeySelector, rightKeySelector, (l, r) => resultSelector.Invoke(JoinOption.Some(l), r)).Concat(source.RightExcludingJoin(join, leftKeySelector, rightKeySelector, (l, r) => resultSelector.Invoke(l, JoinOption.Some(r))));
コード例 #5
0
 public static IEnumerable <TResult> RightExcludingJoin <TLeft, TRight, TKey, TResult>(this IEnumerable <TLeft> source, IEnumerable <TRight> join, Func <TLeft, TKey> leftKeySelector, Func <TRight, TKey> rightKeySelector, Func <JoinOption <TLeft>, TRight, TResult> resultSelector)
 => join.GroupBy(rightKeySelector).SelectMany(g => g).GroupJoin(source, rightKeySelector, leftKeySelector, (r, ls) => ls.DefaultIfEmpty().Where(o => o == null).Select(_ => resultSelector.Invoke(JoinOption.None <TLeft>(), r))).SelectMany(o => o).ToArray();
コード例 #6
0
 public static IEnumerable <TResult> LeftExcludingJoin <TLeft, TRight, TKey, TResult>(this IEnumerable <TLeft> source, IEnumerable <TRight> join, Func <TLeft, TKey> leftKeySelector, Func <TRight, TKey> rightKeySelector, Func <TLeft, JoinOption <TRight>, TResult> resultSelector)
 => source.GroupJoin(join, leftKeySelector, rightKeySelector, (l, rs) => rs.DefaultIfEmpty().Where(o => o == null).Select(_ => resultSelector.Invoke(l, JoinOption.None <TRight>()))).SelectMany(o => o).ToArray();
コード例 #7
0
 public static IEnumerable <TResult> LeftJoin <TLeft, TRight, TKey, TResult>(this IEnumerable <TLeft> source, IEnumerable <TRight> join, Func <TLeft, TKey> leftKeySelector, Func <TRight, TKey> rightKeySelector, Func <TLeft, JoinOption <TRight>, TResult> resultSelector)
 => source.GroupJoin(join, leftKeySelector, rightKeySelector, (l, rs) => rs.Select(r => JoinOption.Some(r)).DefaultIfEmpty(JoinOption.None <TRight>()).Select(r => resultSelector.Invoke(l, r))).SelectMany(o => o).ToArray();