public async Task <ExecutionResult> Execute(ExecuteContext <ObjectGraphActivityArguments> context)
        {
            int     intValue     = context.Arguments.Outer.IntValue;
            string  stringValue  = context.Arguments.Outer.StringValue;
            decimal decimalValue = context.Arguments.Outer.DecimalValue;

            string[] names = context.Arguments.Names;

            Console.WriteLine("TestActivity: Execute: {0}, {1}, {2}, [{3}]", intValue, stringValue, decimalValue,
                              string.Join(",", names));

            if (_intValue != intValue)
            {
                throw new ArgumentException("intValue");
            }
            if (_stringValue != stringValue)
            {
                throw new ArgumentException("stringValue");
            }
            if (_decimalValue != decimalValue)
            {
                throw new ArgumentException("dateTimeValue");
            }

            TestLog log = new TestLogImpl(stringValue);

            return(context.Completed(log));
        }
Example #2
0
        public async Task <ExecutionResult> Execute(ExecuteContext <TestArguments> context)
        {
            Console.WriteLine("FaultyCompensateActivity: Execute: {0}", context.Arguments.Value);

            TestLog log = new TestLogImpl(context.Arguments.Value);

            return(context.Completed(log));
        }
Example #3
0
        public ExecutionResult Execute(Execution <TestArguments> execution)
        {
            Console.WriteLine("FaultyCompensateActivity: Execute: {0}", execution.Arguments.Value);

            TestLog log = new TestLogImpl(execution.Arguments.Value);

            return(execution.Completed(log));
        }
        public ExecutionResult Execute(Execution <TestArguments> execution)
        {
            Console.WriteLine("TestActivity: Execute: {0}", execution.Arguments.Value);

            TestLog log = new TestLogImpl(execution.Arguments.Value);

            return(execution.Completed(log, new
            {
                Value = "Hello, World!",
                NullValue = (string)null,
            }));
        }
Example #5
0
        public async Task <ExecutionResult> Execute(ExecuteContext <TestArguments> context)
        {
            if (context.Arguments.Value == null)
            {
                throw new ArgumentNullException("value");
            }

            TestLog log = new TestLogImpl(context.Arguments.Value);

            return(context.CompletedWithVariables(log, new
            {
                Value = "Hello, World!",
                NullValue = (string)null,
            }));
        }