Beispiel #1
0
        public async Task OnMethodInvoked(AsyncMethodContext context)
        {
            COUNTER_BEFORE++;
            await context.Proceed();

            COUNTER_AFTER++;
        }
Beispiel #2
0
        public async Task OnMethodInvoked(AsyncMethodContext context)
        {
            context.Arguments.SetArgument(0, 2);
            context.Arguments.SetArgument(1, "ab");
            context.Arguments.SetArgument(2, new SimpleStruct(2));
            context.Arguments.SetArgument(3, new SimpleClass(2));
            context.Arguments.SetArgument(4, new[] { 2, 1 });
            context.Arguments.SetArgument(5, new[] { "cd", "ab" });
            context.Arguments.SetArgument(6, new[] { new SimpleStruct(2), new SimpleStruct(1) });
            context.Arguments.SetArgument(7, new[] { new SimpleClass(2), new SimpleClass(1) });
            context.Arguments.SetArgument(8, new List <int> {
                2, 1
            });
            context.Arguments.SetArgument(9, new List <string> {
                "cd", "ab"
            });
            context.Arguments.SetArgument(10, new List <SimpleStruct> {
                new SimpleStruct(2), new SimpleStruct(1)
            });
            context.Arguments.SetArgument(11, new List <SimpleClass> {
                new SimpleClass(2), new SimpleClass(1)
            });

            await context.Proceed();
        }
Beispiel #3
0
        public async Task OnMethodInvoked(AsyncMethodContext context)
        {
            await context.Proceed();

            var value = (string)context.ReturnValue;

            context.SetReturnValue(value + "b");
        }
        public async Task OnMethodInvoked(AsyncMethodContext context)
        {
            await context.Proceed();

            var value = (List <string>)context.ReturnValue;

            value.Add("b");
        }
        public async Task OnMethodInvoked(AsyncMethodContext context)
        {
            await context.Proceed();

            var ret = (int[])context.ReturnValue;

            ret = new[] { 2, ret[0] };
            context.SetReturnValue(ret);
        }
Beispiel #6
0
        public async Task OnMethodInvoked(AsyncMethodContext context)
        {
            await context.Proceed();

            var ret = (List <int>)context.ReturnValue;

            ret.Insert(0, 2);
            context.SetReturnValue(ret);
        }
        public async Task OnMethodInvoked(AsyncMethodContext context)
        {
            await context.Proceed();

            var value    = (string[])context.ReturnValue;
            var newValue = new string[] { value[0], "b" };

            context.SetReturnValue(newValue);
        }
Beispiel #8
0
 public async Task OnMethodInvoked(AsyncMethodContext context)
 {
     await context.Proceed();
 }
Beispiel #9
0
        public async Task OnMethodInvoked(AsyncMethodContext context)
        {
            await context.Proceed();

            context.SetReturnValue("b");
        }
 public Task OnMethodInvoked(AsyncMethodContext context)
 {
     return(context.Proceed());
 }
 internal protected abstract Task Proceed(AsyncMethodContext context);
 public Task Run(AsyncMethodContext context)
 {
     return(_runAction(context));
 }
 public RunContinuation(AsyncMethodContext context)
 {
     _context = context;
 }
 public ProceedContinuation(AsyncMethodContext context)
 {
     _context = context;
 }