Esempio n. 1
0
        public async Task JoinList(JoinRequest request)
        {
            var list = _todoListService.GetList(request.ListId);

            await Groups.AddToGroupAsync(Context.ConnectionId, list.Name);

            await Clients.Group(request.ListId.ToString()).SendAsync("Send", $"{Context.ConnectionId} has joined the group {list.Name}.");

            await Clients.Caller.SendAsync("Joined", new TodoListResponse()
            {
                TodoList = list
            });
        }
Esempio n. 2
0
        public ICommandResult Execute(CommandContext context)
        {
            bool openOnly = context.HasOption("open-only");

            return(BuildMarkdownTaskListResult(service.GetList(), openOnly));
        }