/// <summary>
        /// Adds an Action to be executed in a new scope once this shell scope has been disposed.
        /// </summary>
        public static ShellScope AddDeferredTask(this ShellScope scope, Action <ShellScope> callback)
        {
            scope?.DeferredTask(scope =>
            {
                callback(scope);
                return(Task.CompletedTask);
            });

            return(scope);
        }
 /// <summary>
 /// Adds a Task to be executed in a new scope once this shell scope has been disposed.
 /// </summary>
 public static ShellScope AddDeferredTask(this ShellScope scope, Func <ShellScope, Task> task)
 {
     scope?.DeferredTask(task);
     return(scope);
 }