Search code examples
c#mefbotframework

Using Managed Extensibility Framework and Bot Framework


I'm creating a c# bot framework application that leverages Microsoft's LUIS. I would like to use the Managed Extensibility Framework to manage many LUIS intents the bot framework application would be utilizing. Is using MEF a fitting solution to this problem/ would use MEF in this situation work?


Solution

  • It'd probably be overkill. I don't see a major extensibility situation here: if your bot uses natural language recognition with LUIS, your code will always depend on the intents you define, as you need to state the behaviour associated to each intent.

    However, I could think of having a container that picks 'small components that provide LUIS handlers' up, and then by using Reflection it injects them on certain Dialogs you specified. Each Dialog should depend on a interface for managing LUIS intents, but their logic would be really generic and would break the idea of having dialogs.

    Maybe you can explain a little but more of what are your requirements and what made you thinking about using MEF for that scenario.