public void AddParent(AsyncTask parent) { lock (parents) { parents.Add(parent); parentsCache = parents.ToArray(); } }
public LockTask(Account account = null, int priority = 10, AsyncTask[] parents = null, AsyncTaskParentsMode parentsMode = AsyncTaskParentsMode.CancelIfAnyErrorOrCanceled) : base(account, "", priority, parents ?? new AsyncTask[0], parentsMode) { this.delay = 0; // no delay locker = new AutoResetEvent(false); }
public LockTask( int delay, Account account = null, int priority = 10, AsyncTask[] parents = null, AsyncTaskParentsMode parentsMode = AsyncTaskParentsMode.CancelIfAnyErrorOrCanceled) : base(account, "", priority, parents ?? new AsyncTask[0], parentsMode) { this.delay = delay; locker = new ManualResetEvent(true); // always unlocked }
protected void AddTask(AsyncTask task) { Manager.Add(task); }
protected AsyncTask(Account account, string accountName, int priority, AsyncTask[] parents, AsyncTaskParentsMode parentsMode = AsyncTaskParentsMode.CancelIfAnyErrorOrCanceled) { Account = account; AccountName = accountName; State = AsyncTaskState.Waiting; Priority = priority; Parents = parents; ParentsMode = parentsMode; ID = Guid.NewGuid().ToString(); }
public abstract void SaveTask(AsyncTask task);
public TaskInfo(AsyncTask asyncTask, Task task) { StartTime = DateTime.Now; AsyncTask = asyncTask; Task = task; }
public abstract void DeleteTask(AsyncTask task);
public override void SaveTask(AsyncTask task) { }
public override void DeleteTask(AsyncTask task) { }