コード例 #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);
 }