Esempio n. 1
0
        private void UpdateJobStatusCompletionMethod(
            string status,
            Exception exception,
            bool canceled,
            AsyncOperation asyncOp)
        {
            // If the task was not previously canceled,
            // remove the task from the lifetime collection.
            if (!canceled)
            {
                lock (userStateToLifetimeUpdateStatus.SyncRoot)
                {
                    userStateToLifetimeUpdateStatus.Remove(asyncOp.UserSuppliedState);
                }
            }

            // Output SendFileCompletedEventArgs
            UpdateStatusCompleteEventArgs e =
                new UpdateStatusCompleteEventArgs(status,
                                                  exception,
                                                  canceled,
                                                  asyncOp.UserSuppliedState);

            // End the task. The asyncOp object is responsible
            // for marshaling the call.
            asyncOp.PostOperationCompleted(onUpdateJobStatusCompleted, e);
        }
Esempio n. 2
0
        private void UpdateJobStatusCompleted(object state)
        {
            UpdateStatusCompleteEventArgs e =
                state as UpdateStatusCompleteEventArgs;

            OnJobStatusCompleted(e);
        }
Esempio n. 3
0
 protected void OnJobStatusCompleted(
     UpdateStatusCompleteEventArgs e)
 {
     UpdateJobStatusProcessCompleted?.Invoke(this, e);
 }