Ejemplo n.º 1
0
        private async Task DoExecute(object value)
        {
            if (false == action.IsAlive)
            {
                return;
            }

            var func = action.CreateDelegate();
            var task = func.Invoke(value);

            await task.ConfigureAwait(false);

            using (access.AccquireWriterLock())
            {
                IsExecuting = false;
                cts         = null;
            }

            var status = GetTaskCompleteStatus(task);

            complete.Invoke(this, new CommandCompleteEventArgs(status));
        }