예제 #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
파일: TEither.cs 프로젝트: kogoia/Types
 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
파일: TEither.cs 프로젝트: kogoia/Types
 public P(TLeft value) : base(value)
 {
 }
예제 #11
0
파일: TEither.cs 프로젝트: kogoia/Types
 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;
 }