protected IParent(TRight right) : this( new Union <TLeft, TRight>(right), new Functor <TLeft, TRight> .TParent <Either <TLeft, TRight> >( new Union <TLeft, TRight>(right) ) ) { }
public void OnRightNext(TRight value) { this.currentlyOpenRight.Add(value); openSubs.Add(this.joinOperator.rightDurationSelector(value).Subscribe(new CallbackObserver <TRightDuration>(_ => { }, _ => OnFinished(), OnFinished))); foreach (var leftValue in this.currentlyOpenLeft) { this.observer.OnNext(this.joinOperator.resultSelector(leftValue, value)); } void OnFinished() { this.currentlyOpenRight.Remove(value); } }
private void Dequeue() { if (this.leftQ.Count != 0 && this.rightQ.Count != 0) { TLeft arg = this.leftQ.Dequeue(); TRight arg2 = this.rightQ.Dequeue(); TResult value; try { value = this.parent.selector(arg, arg2); } catch (Exception error) { try { this.observer.OnError(error); } finally { base.Dispose(); } return; } this.OnNext(value); return; } if (!this.leftCompleted) { if (!this.rightCompleted) { return; } } try { this.observer.OnCompleted(); } finally { base.Dispose(); } }
public async Task <ApiRequestResult> AddAsync([FromBody] RightParam param) { try { var add = new TRight { RightName = param.RightName, ParentId = param.ParentId, Description = param.Description, RightIcon = param.RightIcon, RightUrl = param.RightUrl, }; await _iTRightRepository.AddAsync(add); return(ApiRequestResult.Success("添加成功")); } catch (Exception ex) { return(ApiRequestResult.Error(ex.Message)); } }
private void Dequeue() { if (leftQ.Count != 0 && rightQ.Count != 0) { TLeft arg = leftQ.Dequeue(); TRight arg2 = rightQ.Dequeue(); TResult value; try { value = parent.selector(arg, arg2); } catch (Exception error) { try { observer.OnError(error); } finally { Dispose(); } return; } OnNext(value); } else if (leftCompleted || rightCompleted) { try { observer.OnCompleted(); } finally { Dispose(); } } }
/// <summary> /// Creates a new instance of <see cref="DiffValue"/> /// </summary> public DiffValue(TLeft left, TRight right) { Left = left; Right = right; }
public A Prune(TRight value) { return(new Factory <A, TRight>(value).Instance()); }
public P(TRight value) : base(value) { }
public void Deconstruct(out TRight right, out TLeft left) { right = Right; left = Left; }
internal Relation(TLeft left, TRight right) { Left = left; Right = right; }