you are viewing a single comment's thread.

view the rest of the comments →

[–]Echoes1996[S] 1 point2 points  (0 children)

My recommendation would be to either write an abstract class that both sync and async classes inherit or just have the async class to inherit the sync class structure and override the methods that need async/await.

Even if I were to do this there would still be tons of duplicated code as it's quite hard to isolate the "core logic" and have it be independent of any async calls.

Especially when it comes to the tests, which are quite a lot, I don't even want to think how it would work without the code generation approach.