Exemple #1
0
        public static Result <T> Of <TActivity>([NotNull] ActivityDescriptor <TActivity> descriptor)
            where TActivity : class, IActivity <T>
        {
            descriptor.AssertNotNull("descriptor != null");

            var result = new Result <T>(descriptor.NotNull().Id);

            descriptor.RegisterActivityTaskHandler(task => HandleCompletedTask(task, result));

            return(result);
        }
 public ResultBinding([NotNull] string propertyName, [NotNull] ActivityDescriptor <TActivity> activity)
 {
     PropertyName = propertyName.NotNullOrEmpty("propertyName");
     Activity     = activity.NotNull();
 }