예제 #1
0
 /// <summary>
 /// Helper to execute a task. Silently ignores null tasks.
 /// </summary>
 private void ExecuteTask(AcaciaTask task, bool synchronous)
 {
     if (task == null)
     {
         return;
     }
     Tasks.Task(task, synchronous);
 }
예제 #2
0
        public void SendReceive(IAccount account, AcaciaTask after)
        {
            if (after != null)
            {
                Watcher.Sync.AddEndTaskOnce(after);
            }

            // TODO: send/receive specific account
            NSOutlook.NameSpace session = _app.Session;
            try
            {
                session.SendAndReceive(false);
            }
            finally
            {
                ComRelease.Release(session);
            }
        }
예제 #3
0
 public void AddEndTaskOnce(AcaciaTask after)
 {
     _endTasks.Enqueue(after);
 }
예제 #4
0
 /// <summary>
 /// Triggers an Outlook send/receive operation for this account.
 /// </summary>
 public void SendReceive(AcaciaTask after = null)
 {
     ThisAddIn.Instance.SendReceive(this, after);
 }