Beispiel #1
0
        public async Task <IConversation> Build(
            string name,
            IConversationContext context,
            ISpeaker self,
            ISpeaker target)
        {
            try
            {
                var script = await _manager.Build(name);

                var conversation = new ScriptedConversation(
                    script,
                    context,
                    self,
                    target
                    );

                return(conversation);
            }
            catch (FileNotFoundException)
            {
                return(new FallbackConversation(context, self, target, name));
            }
        }