Overriding IPostToBot
How do I override the IPostToBot interface without having to duplicate the Conversation Class. The Conversation Class has a static constructor which doesn't give any opportunities for overriding implementations setup in Autofac. The DialogModule and DialogModule_MakeRoot are both sealed classes, so I can't alter how the implementations of the interfaces are added to Autofac. So, how can I override the implementation of IPostToBot?
There are a few places where we customize the Autofac container. There is no need to derive a class from the DialogModule, you can simply override previous registrations after registering the DialogModule. Here is an example where we use the framework code from a console application:
https://github.com/Microsoft/BotBuilder/blob/master/CSharp/Tests/FormTest/Program.cs#L101
I made an error in my original request. Instead of IPostToBot, I meant to say IBotToUser. Is the answer still the same?
Yes, the answer is the same - IBotToUser is even a simpler case:
https://github.com/Microsoft/BotBuilder/blob/master/CSharp/Tests/FormTest/Program.cs#L118
I'm going to close this issue, but feel free to open a new issue for further discussions.