コード例 #1
0
        IDialogTask IDialogTasks.CreateDialogTask()
        {
            IDialogStack stack = default(IDialogStack);
            Func <CancellationToken, IDialogContext> makeContext = token => contextFactory(stack, token);
            var task = new DialogTask(makeContext, stackStoreFactory.StoreFrom(this.GetCurrentTaskBlobKey(this.dialogTasks.Count), botData.PrivateConversationData), this.queue);

            stack = task;
            dialogTasks.Add(task);
            return(task);
        }
コード例 #2
0
            public async Task <IWait <DialogTask> > Rest(IFiber <DialogTask> fiber, DialogTask task, IItem <object> item, CancellationToken token)
            {
                var result = await item;

                if (result != null)
                {
                    throw new ArgumentException(nameof(item));
                }

                await this.start(task.makeContext(token));

                return(task.NextWait());
            }
コード例 #3
0
 public Frames(DialogTask task)
 {
     SetField.NotNull(out this.task, nameof(task), task);
 }
コード例 #4
0
            public async Task <IWait <DialogTask> > Rest(IFiber <DialogTask> fiber, DialogTask task, IItem <T> item, CancellationToken token)
            {
                await this.resume(task.makeContext(token), item);

                return(task.NextWait());
            }