/// <summary>
 /// indicates the task is synchronous
 /// </summary>
 /// <param name="task"></param>
 /// <returns></returns>
 public static ISynchronousDecoration IsSynchronous(this ITask task)
 {
     Condition.Requires(task).IsNotNull();
     var rv =  task.As<SynchronousDecoration>();
     if (rv == null)
         rv = new SynchronousDecoration(task);
     return rv;
 }
        /// <summary>
        /// indicates the task is synchronous
        /// </summary>
        /// <param name="task"></param>
        /// <returns></returns>
        public static ISynchronousDecoration IsSynchronous(this ITask task)
        {
            Condition.Requires(task).IsNotNull();
            var rv = task.As <SynchronousDecoration>();

            if (rv == null)
            {
                rv = new SynchronousDecoration(task);
            }
            return(rv);
        }