コード例 #1
0
        public object Bind(IActionDescriptor actionDescriptor, ActionContext context)
        {
            var action = new SendFormatAction(context)
            {
                Output = actionDescriptor.GetRequired(nameof(SendFormatAction.Output))
            };

            return(action);
        }
コード例 #2
0
        public static async Task SendAsync(this Session session, string output,
                                           CancellationToken cancellationToken = default)
        {
            var action = new SendFormatAction(new ActionContext(session.Expectable, session.ItemsCache))
            {
                Output = output
            };

            await new SendFormatActionHandler(Renderer).Handle(action, cancellationToken);
        }