Пример #1
0
 public void Initialize(long start, ref TKey key, ref TLeft payload, int heapIndex)
 {
     this.Start     = start;
     this.Key       = key;
     this.Payload   = payload;
     this.HeapIndex = heapIndex;
 }
Пример #2
0
 public void Populate(long start, long currentStart, long end, ref TKey key, ref TLeft payload)
 {
     this.Start        = start;
     this.CurrentStart = currentStart;
     this.End          = end;
     this.Key          = key;
     this.Payload      = payload;
 }
Пример #3
0
 protected IParent(TLeft left)
     : this(
         new Union <TLeft, TRight>(left),
         new Functor <TLeft, TRight> .TParent <Either <TLeft, TRight> >(
             new Union <TLeft, TRight>(left)
             )
         )
 {
 }
Пример #4
0
            public void OnLeftNext(TLeft value)
            {
                this.currentlyOpenLeft.Add(value);

                openSubs.Add(this.joinOperator.leftDurationSelector(value).Subscribe(new CallbackObserver <TLeftDuration>(_ => OnFinished(),
                                                                                                                          _ => OnFinished(), OnFinished)));

                foreach (var rightValue in this.currentlyOpenRight)
                {
                    this.observer.OnNext(this.joinOperator.resultSelector(value, rightValue));
                }

                void OnFinished()
                {
                    this.currentlyOpenLeft.Remove(value);
                }
            }
Пример #5
0
 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();
     }
 }
Пример #6
0
 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();
         }
     }
 }
Пример #7
0
 /// <summary>
 /// Creates a new instance of <see cref="DiffValue"/>
 /// </summary>
 public DiffValue(TLeft left, TRight right)
 {
     Left  = left;
     Right = right;
 }
Пример #8
0
 public void Populate(long start, ref TKey key, ref TLeft payload)
 {
     this.Start   = start;
     this.Key     = key;
     this.Payload = payload;
 }
 public BindPipe(TLeft context, IPipe <BindContext <TLeft, TRight> > output)
 {
     _context = context;
     _output  = output;
 }
Пример #10
0
 public P(TLeft value) : base(value)
 {
 }
Пример #11
0
 public Func(TLeft value) : base(value)
 {
 }
Пример #12
0
 public void Deconstruct(out TRight right, out TLeft left)
 {
     right = Right;
     left  = Left;
 }
Пример #13
0
 internal Relation(TLeft left, TRight right)
 {
     Left  = left;
     Right = right;
 }