// Token: 0x06008DA5 RID: 36261 RVA: 0x00259CB6 File Offset: 0x00257EB6 public Task(IDataBindEngineClient c, TaskOps o, DataBindEngine.Task previousForClient) { this.client = c; this.op = o; this.PreviousForClient = previousForClient; this.status = DataBindEngine.Task.Status.Pending; }
// Token: 0x060074B3 RID: 29875 RVA: 0x00216184 File Offset: 0x00214384 internal object Run(object arg) { bool flag = (bool)arg; DataBindEngine.Task task = flag ? null : new DataBindEngine.Task(null, TaskOps.TransferValue, null); DataBindEngine.Task task2 = task; if (this._layoutElement != null) { this._layoutElement.LayoutUpdated -= this.OnLayoutUpdated; this._layoutElement = null; } if (this.IsShutDown) { return(null); } DataBindEngine.Task next; for (DataBindEngine.Task task3 = this._head.Next; task3 != null; task3 = next) { task3.PreviousForClient = null; if (task3.status == DataBindEngine.Task.Status.Pending) { task3.Run(flag); next = task3.Next; if (task3.status == DataBindEngine.Task.Status.Retry && !flag) { task3.status = DataBindEngine.Task.Status.Pending; task2.Next = task3; task2 = task3; task2.Next = null; } } else { next = task3.Next; } } this._head.Next = null; this._tail = this._head; this._mostRecentTask.Clear(); if (!flag) { DataBindEngine.Task head = this._head; this._head = null; for (DataBindEngine.Task next2 = task.Next; next2 != null; next2 = next2.Next) { this.AddTask(next2.client, next2.op); } this._head = head; } return(null); }
// Token: 0x060074B1 RID: 29873 RVA: 0x002160D0 File Offset: 0x002142D0 internal void CancelTask(IDataBindEngineClient c, TaskOps op) { if (this._mostRecentTask == null) { return; } for (DataBindEngine.Task task = (DataBindEngine.Task) this._mostRecentTask[c]; task != null; task = task.PreviousForClient) { if (task.op == op && task.status == DataBindEngine.Task.Status.Pending) { task.status = DataBindEngine.Task.Status.Cancelled; return; } } }
// Token: 0x060074B2 RID: 29874 RVA: 0x00216120 File Offset: 0x00214320 internal void CancelTasks(IDataBindEngineClient c) { if (this._mostRecentTask == null) { return; } for (DataBindEngine.Task task = (DataBindEngine.Task) this._mostRecentTask[c]; task != null; task = task.PreviousForClient) { Invariant.Assert(task.client == c, "task list is corrupt"); if (task.status == DataBindEngine.Task.Status.Pending) { task.status = DataBindEngine.Task.Status.Cancelled; } } this._mostRecentTask.Remove(c); }
// Token: 0x060074B0 RID: 29872 RVA: 0x00216030 File Offset: 0x00214230 internal void AddTask(IDataBindEngineClient c, TaskOps op) { if (this._mostRecentTask == null) { return; } if (this._head == this._tail) { this.RequestRun(); } DataBindEngine.Task previousForClient = (DataBindEngine.Task) this._mostRecentTask[c]; DataBindEngine.Task task = new DataBindEngine.Task(c, op, previousForClient); this._tail.Next = task; this._tail = task; this._mostRecentTask[c] = task; if (op == TaskOps.AttachToContext && this._layoutElement == null && (this._layoutElement = (c.TargetElement as UIElement)) != null) { this._layoutElement.LayoutUpdated += this.OnLayoutUpdated; } }