Wednesday 17 May 2017

Nodejs and microsoft bot framework

I am looking at the nodejs code here https://github.com/Microsoft/BotBuilder/blob/master/Node/examples/basics-waterfall/app.js

I am trying to understand this piece of code

var bot = new builder.UniversalBot(connector, [
    function (session) {
        ...
    },
    function (session, results) {
        ...
    },
    function (session, results) {
       ...
    },
    function (session, results) {
        ...
    }
]);

I understand that var bot is a function expression and takes in two parameters one is a connector and another is an array of functions.

Do these array of functions execute serially in the order they are defined ?

Comming from another programming background i am not familiar with this dialect.

How can i make this program more C# like is async await the answer ?

If async await is the answer how do i convert this to use the async/await paradigm ?



via jhon.smith

No comments:

Post a Comment