コード例 #1
0
        public void TestSetup()
        {
            state = new SchedulerState(Task.CompletedTask, CancellationToken.None);

            job = Substitute.For <IStreamJob>();

            launcher = Substitute.For <IJobLauncher>();

            handler = new JobHandler(launcher);
        }
コード例 #2
0
 public void LaunchSendJob(IStreamJob job, SchedulerState state)
 => state.SendingJobs.Add(job.SendAsync(state.CancellationToken).ContinueWith(_ => new SendingJobResult(job)));
コード例 #3
0
 public void LaunchWaitJob(IStreamJob job, SchedulerState state)
 => state.WaitingJobs.Add(job.WaitForNextSendAsync(state.CancellationToken).ContinueWith(_ => new WaitingJobResult(job)));
コード例 #4
0
 public WaitingJobResult([NotNull] IStreamJob job)
 => Job = job;
コード例 #5
0
 public SendingJobResult([NotNull] IStreamJob job)
 => Job = job;