public DoSomethingAsync ( ) : System.Threading.Tasks.Task | ||
return | System.Threading.Tasks.Task |
public async Task DoSomethingAsync() { var handWritten = new HandWritten(); var proxy = new HandWrittenProxy(handWritten, new InvocationHandler(async invocation => { await Task.Delay(1); await invocation.Proceed(); return(null); })); await proxy.DoSomethingAsync(); Assert.IsTrue(handWritten.DoSomethingAsyncCalled); }
public async void DoSomethingAsync() { var handWritten = new HandWritten(); var proxy = new HandWrittenProxy(handWritten, new InvocationHandler(async invocation => { await Task.Delay(1); await invocation.Proceed(); return null; })); await proxy.DoSomethingAsync(); Assert.IsTrue(handWritten.DoSomethingAsyncCalled); }