예제 #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
            });
        }
예제 #2
0
파일: ShowQuery.cs 프로젝트: akobr/texo.ui
        public ICommandResult Execute(CommandContext context)
        {
            bool openOnly = context.HasOption("open-only");

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