private void FireWorkItemsChanged(WorkItemsChangedEventArgs e) { if (!_disposed) { EventsHelper.Fire(_workItemsChanged, this, e); } }
private void OnWorkItemsChanged(object sender, WorkItemsChangedEventArgs e) { if (_synchronizationContext != null) { _synchronizationContext.Post(ignore => FireWorkItemsChanged(e), null); } else { FireWorkItemsChanged(e); } }
private void OnWorkItemsChanged(WorkItemsChangedEventType eventType, List <WorkItemData> workItems) { IList <Delegate> delegates; lock (_syncLock) { if (_disposed) { return; } delegates = _workItemsChanged != null?_workItemsChanged.GetInvocationList() : new Delegate[0]; } if (delegates.Count <= 0) { return; } var args = new WorkItemsChangedEventArgs(eventType, workItems); CallDelegates(delegates, args); }