/// <summary>
        /// The Wrapping does 2 things for children:
        /// (1) propagate error to other children of the host
        /// (2) call completion back of the child
        /// </summary>
        protected Task GetWrappedCompletion(Task rawCompletion)
        {
            if (Kind == DependencyKind.External)
            {
                return(rawCompletion);
            }

            //for internal dependencies, we have something to do
            var tcs = new TaskCompletionSource <object>();

            rawCompletion.ContinueWith(
                task =>
            {
                if (task.Status == TaskStatus.Faulted)
                {
                    var exception = TaskEx.UnwrapWithPriority(task.Exception);
                    tcs.SetException(exception);

                    if (!(exception is PropagatedException))
                    {
                        m_host.Fault(exception);         //fault other blocks if this is an original exception
                        //todo: log this original exception
                    }
                    {
                        //todo: extension point
                    }
                }
                else if (task.Status == TaskStatus.Canceled)
                {
                    tcs.SetCanceled();
                    m_host.Fault(new TaskCanceledException());
                }
                else         //success
                {
                    try
                    {
                        //call callback
                        if (m_completionCallback != null)
                        {
                            m_completionCallback(task);
                        }
                        tcs.SetResult(string.Empty);
                    }
                    catch (Exception e)
                    {
                        LogHelper.Logger.Error(
                            h =>
                            h(
                                "{0} Error when callback {1} on its completion",
                                m_host.FullName,
                                this.DisplayName),
                            e);
                        tcs.SetException(e);
                        m_host.Fault(e);
                    }
                }
            });

            return(tcs.Task);
        }