protected override TResult Execute(CodeActivityContext context) { DynamicValue value = Value.Get(context); TResult result = DynamicValueConvert.ConvertTo <TResult>(value); return(result); }
protected override void Execute(NativeActivityContext context) { DynamicValue dynCondition = context.GetValue <DynamicValue>(this.Condition); bool condition = DynamicValueConvert.ConvertTo <bool>(dynCondition); if (condition) { if (null != this.Then) { context.ScheduleActivity(this.Then); } } else { if (null != this.Else) { context.ScheduleActivity(this.Else); } } }