botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Logical seperation of AfterResume function from LUIS dialog class

Open Sams4u opened this issue 10 years ago • 3 comments

Hi, i am new to this BOT framework, Inside the LUIS dialog I have used some promptdialog . The AfterResume function for all these prompts are defined in the same class since I need to call MessageRecieved which is a protected function. I want to separate the logic by moving these AfterResume function to another class. How can I do that?

Sams4u avatar Jul 28 '16 16:07 Sams4u

Could you use a C# partial class?

willportnoy avatar Aug 02 '16 16:08 willportnoy

Yes, I am using c# to develop. i tried to inherit the Idialog class and implement the function. But nothing seems to be working. All i understood is, when the AfterResume function gets called IAwaitable value is passed and if i can manually pass that to a function i can redefine it outside the LuisDialog class. But how?.Also even if we do it somehow how can i call the protected function messagereceived in the AfterResume function?

Sams4u avatar Aug 04 '16 06:08 Sams4u

Another alternative is to use a child IDialog implementation. Dialogs are the component model for the Bot Builder SDK, allowing reuse of related pieces of code and data.

I'm going to close this issue, but feel free to open a new issue for further discussions.

willportnoy avatar Aug 09 '16 20:08 willportnoy