I experiment some trouble with the reject method on transaction class.
When I analyse the source I can see that you used 'Wait()' on async method. This is bad practice in C#. It generate an AggregateException instead of the real exception. Calling async method on synchronous way is also a bad practices, and can create deadlock.
To fix that I create for each method, one async and one sync that call async method with GetAwaiter().GetResult(). It's more elegant, and allow developer to use async method in their implementations.
I also refactoring the code. I only touch the Transaction class.
I experiment some trouble with the reject method on transaction class. When I analyse the source I can see that you used 'Wait()' on async method. This is bad practice in C#. It generate an AggregateException instead of the real exception. Calling async method on synchronous way is also a bad practices, and can create deadlock.
To fix that I create for each method, one async and one sync that call async method with GetAwaiter().GetResult(). It's more elegant, and allow developer to use async method in their implementations.
I also refactoring the code. I only touch the Transaction class.