Example #1
0
        public async Task <IPlayer> JoinRoom(string roomId, Guid connectionId)
        {
            var command = new JoinRoomCommand {
                RoomId = roomId
            };
            await _context.Send(command);

            return(new PlayerProxy(_context, roomId));
        }
Example #2
0
        public Task UpdateOptions(PlayerOptionsData options)
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }
            var command = new UpdatePlayerOptionsCommand
            {
                RoomId  = _roomId,
                Options = options
            };

            return(_context.Send(command));
        }