SumAsync() 공개 메소드

public SumAsync ( int first, int second ) : Task
first int
second int
리턴 Task
예제 #1
0
        public async Task SumAsync()
        {
            var handWritten = new HandWritten();
            var proxy       = new HandWrittenProxy(handWritten, new InvocationHandler(async invocation =>
            {
                var value = (int)await invocation.Proceed();
                return(value + 3);
            }));
            var result = await proxy.SumAsync(1, 2);

            Assert.AreEqual(6, result);
        }
예제 #2
0
 public async void SumAsync()
 {
     var handWritten = new HandWritten();
     var proxy = new HandWrittenProxy(handWritten, new InvocationHandler(async invocation =>
     {
         var value = (int)await invocation.Proceed();
         return value + 3;
     }));
     var result = await proxy.SumAsync(1, 2);
     Assert.AreEqual(6, result);
 }