private void AsyncStarter(AsyncDeleteData data, WorkerDeleteEventHandler workerDelegate, Object userData)
        {
            AsyncOperation asyncOp = AsyncOperationManager.CreateOperation(userData);

            data.Operation = asyncOp;
            AddUserDataToDictionary(userData, asyncOp);

            // Start the asynchronous operation.
            workerDelegate.BeginInvoke(data, asyncOp, CompletionMethodDelegate, null, null);
        }
        private void AsyncDeleteWorker(AsyncDeleteData data, AsyncOperation asyncOp, SendOrPostCallback completionMethodDelegate)
        {
            try {
                Delete(data.Entry, data.PermanentDelete);
            } catch (Exception e) {
                data.Exception = e;
            }

            completionMethodDelegate(data);
        }
Beispiel #3
0
        private void AsyncDeleteWorker(AsyncDeleteData data, AsyncOperation asyncOp, SendOrPostCallback completionMethodDelegate) {
            try {
                Delete(data.Entry, data.PermanentDelete);
            } catch (Exception e) {
                data.Exception = e;
            }

            completionMethodDelegate(data);
        }
Beispiel #4
0
        private void AsyncStarter(AsyncDeleteData data, WorkerDeleteEventHandler workerDelegate, Object userData) {
            AsyncOperation asyncOp = AsyncOperationManager.CreateOperation(userData);
            data.Operation = asyncOp;
            AddUserDataToDictionary(userData, asyncOp);

            // Start the asynchronous operation.
            workerDelegate.BeginInvoke(data, asyncOp, CompletionMethodDelegate, null, null);
        }
Beispiel #5
0
 public void DeleteAsync(AtomEntry entry, bool permanentDelete, Object userData) {
     AsyncDeleteData data = new AsyncDeleteData(entry, permanentDelete, userData, ProgressReportDelegate);
     AsyncStarter(data, AsyncDeleteWorker, userData);
 }
        public void DeleteAsync(AtomEntry entry, bool permanentDelete, Object userData)
        {
            AsyncDeleteData data = new AsyncDeleteData(entry, permanentDelete, userData, ProgressReportDelegate);

            AsyncStarter(data, AsyncDeleteWorker, userData);
        }