Now that Syn.Bot has moved entirely into .NET Standard, could we get proper async/await support? Async adapter would be a good start.
What I mean - currently we can make synchronous adapters and event adapters, as stated in official documentation
. Sync adapters are great because they're easy to implement and use within SIML. Event adapters, while asynchronous, are very verbose and require from SIML extra code to handle them, like shown here
It'd be excellent if there was a way to implement async/await adapter - this way runtime would make use of asynchronous processing while not complicating SIML code that requires from programmer to know which adapter has event-based pattern and needs to be handled in special way.
Basically I'm thinking of AsyncAdapter class that would work exactly the same as current Adapter class, but would have EvaluateAsync method to override instead of Evaluate one, that would return Task<string> instead of string, making it possible for Syn.Bot to await evaluation in async manner. Likewise, SimlBot.Chat() method could make use of extra SimlBot.ChatAsync() that would return Task<ChatResult> instead of ChatResult, making it possible for us to await execution in async manner, exactly the same as Syn.Bot would await async adapter.
The general reason why I suggest those features is because C# offers excellent async/await approach that simplifies a lot of async patterns, instead of approaches available right now based on executing functions and getting results in callbacks, like it was done in .NET 4.0 times.
Thank you a lot for considering my idea.