As the project first truly touches, it uses both synchronous and asynchronous. Record a few personal bright:
. NET now offers a handy feature: async, await.
1. The method that is identified for async is an async method, and the return value of the class method can only be void or task<t>. (e.g.:task<bool> pingasync ();)
2. When the return value of the Async method needs to be obtained, it must be marked with an await at the call: it can be understood to wait for the return value of the Async method. (such as: var result = await _serverfacade.pingasync ();)
3. The method must also be an async method if the await is indicated internally.
Then, there is always a synchronization method on the top level, right? How to deal with it?
1. Asynccommand, you can bind an async method to the command
2. Async methods. Result (for example: var result = _serverfacade.pingasync (). Result;)
======================================================
For configureawait (BOOL)
Some small issues with synchronous asynchronous calls