Exemplo n.º 1
0
 public GameService(IConfiguration configuration, ApplicationDbContext context, IUserGame userGameServices, IUpload uploadService)
 {
     _config                    = configuration;
     _context                   = context;
     _userGameServices          = userGameServices;
     _uploadService             = uploadService;
     AzureBlobStorageConnection = _config.GetConnectionString("AZURE_BLOB_STORAGE_USER_IMAGES");
 }
Exemplo n.º 2
0
        // Games

        /// <summary>The unique id that identifies a game,
        /// which can be its owner's user ID or the housing channel's ID depending on the type.</summary>
        public static ulong IdentifierId(this IBaseGame game)
        {
            return(game switch
            {
                IUserGame userGame => userGame.OwnerId,
                IChannelGame channelGame => channelGame.ChannelId,
                _ => game.UserId[0],
            });
Exemplo n.º 3
0
 public HomeController(
     IUserGame userGameService
     , IApplicationUser userService
     , UserManager <ApplicationUser> userManager)
 {
     _userGameService = userGameService;
     _userManager     = userManager;
     _userService     = userService;
 }
Exemplo n.º 4
0
 public HomeController(
     IUserGame userGameService
     , IGame gameService
     , IApplicationUser userService
     , UserManager <ApplicationUser> userManager
     , IMonthlyWinners monthlyWinnersService)
 {
     _gameService           = gameService;
     _userGameService       = userGameService;
     _userManager           = userManager;
     _userService           = userService;
     _monthlyWinnersService = monthlyWinnersService;
 }
Exemplo n.º 5
0
 public UsersController(
     IApplicationUser userService,
     IUserGame userGameService,
     IGame gameService,
     IEmailSender emailService,
     UserManager <ApplicationUser> userManager,
     IMonthlyWinners monthlyWinnersService)
 {
     _userService           = userService;
     _userGameService       = userGameService;
     _gameService           = gameService;
     _userManager           = userManager;
     _emailService          = emailService;
     _monthlyWinnersService = monthlyWinnersService;
 }
Exemplo n.º 6
0
 public UserGameController(
     IUserGame userGameService
     , IGame gameService
     , IApplicationUser userService
     , UserManager <ApplicationUser> userManager
     , IHubContext <ScoreboardsHub> hubContext
     , IMonthlyWinners monthlyWinnersService)
 {
     _gameService           = gameService;
     _userGameService       = userGameService;
     _userManager           = userManager;
     _userService           = userService;
     _hubContext            = hubContext;
     _monthlyWinnersService = monthlyWinnersService;
 }
Exemplo n.º 7
0
 public GameController(
     IGame game
     , IUserGame userGameService
     , IApplicationUser userService
     , IMonthlyWinners monthlyWinnersService
     , IUpload uploadService
     , IConfiguration configuration)
 {
     _game                  = game;
     _userGameService       = userGameService;
     _userService           = userService;
     _monthlyWinnersService = monthlyWinnersService;
     _uploadService         = uploadService;
     _config                = configuration;
     // Game Images are in the same storage container as User Images, but they are in separate blobs
     _azureBlobStorageConnection = _config.GetConnectionString("AZURE_BLOB_STORAGE_USER_IMAGES");
 }
Exemplo n.º 8
0
 public MonthlyWinnersService(ApplicationDbContext context, IUserGame userGameServices)
 {
     _context          = context;
     _userGameServices = userGameServices;
 }