Ejemplo n.º 1
0
        public static ActivityGroup AnyFailed <T>(this ActivityGroup activity,
                                                  Expression <Func <T, Task> > func)
        {
            if (activity == null)
            {
                throw new ArgumentNullException("activity");
            }

            return(activity.AnyFailed(Activity.Run(func)));
        }
Ejemplo n.º 2
0
        public static ActivityGroup ExceptionFilter <TFilter>(this ActivityGroup activityGroup,
                                                              Expression <Action <ExceptionContext, TFilter> > filter)
        {
            if (activityGroup == null)
            {
                throw new ArgumentNullException("activityGroup");
            }
            if (filter == null)
            {
                throw new ArgumentNullException("filter");
            }

            activityGroup.ExceptionFiltersList.Add(Dependable.ExceptionFilter.From(filter));
            return(activityGroup);
        }