/// <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); }
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); } }
public void AddEndTaskOnce(AcaciaTask after) { _endTasks.Enqueue(after); }
/// <summary> /// Triggers an Outlook send/receive operation for this account. /// </summary> public void SendReceive(AcaciaTask after = null) { ThisAddIn.Instance.SendReceive(this, after); }