Exemplo n.º 1
0
 private void OnStatusAvailable(TaskCommandStatus status)
 {
     if (StatusAvailable != null)
     {
         StatusAvailable(this, new TaskCommandStatusEventArgs(status));
     }
 }
 public TaskCommandStatusEventArgs(TaskCommandStatus status)
 {
     if (status == null)
     {
         throw new ArgumentNullException("status");
     }
     this.status = status;
 }
 public TaskCommandStatusEventArgs(TaskCommandStatus status)
 {
     if (status == null)
     {
         throw new ArgumentNullException("status");
     }
     this.status = status;
 }
Exemplo n.º 4
0
        private void processCommand_StatusAvailable(object sender, TaskCommandStatusEventArgs e)
        {
            TaskCommandStatus status = e.Status;

            if (status == null)
            {
                throw new InvalidOperationException("status");
            }

            if (JobStatusAvailable == null)
            {
                jobStatusQueue.Enqueue(status); // TODO: what if too much status?
            }
            else
            {
                jobStatusQueue.Enqueue(status);
                TaskCommandStatus queued;
                while ((!jobStatusQueue.IsEmpty) && jobStatusQueue.TryDequeue(out queued))
                {
                    JobStatusAvailable(this, new JobStatusEventArgs(status));
                }
            }
        }
Exemplo n.º 5
0
 private void OnStatusAvailable(TaskCommandStatus status)
 {
     if (StatusAvailable != null)
     {
         StatusAvailable(this, new TaskCommandStatusEventArgs(status));
     }
 }