Exemplo n.º 1
0
 private void FireWorkItemsChanged(WorkItemsChangedEventArgs e)
 {
     if (!_disposed)
     {
         EventsHelper.Fire(_workItemsChanged, this, e);
     }
 }
Exemplo n.º 2
0
 private void OnWorkItemsChanged(object sender, WorkItemsChangedEventArgs e)
 {
     if (_synchronizationContext != null)
     {
         _synchronizationContext.Post(ignore => FireWorkItemsChanged(e), null);
     }
     else
     {
         FireWorkItemsChanged(e);
     }
 }
Exemplo n.º 3
0
        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);
        }