示例#1
0
        protected override TResult Execute(CodeActivityContext context)
        {
            DynamicValue value  = Value.Get(context);
            TResult      result = DynamicValueConvert.ConvertTo <TResult>(value);

            return(result);
        }
示例#2
0
        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);
                }
            }
        }