コード例 #1
0
ファイル: DebtsService.cs プロジェクト: nsine/wisepay-backend
 public DebtsService(
     WiseContext db,
     PurchasesService purchasesService,
     AvatarsService avatarsService)
 {
     _db = db;
     _purchasesService = purchasesService;
     _avatarsService   = avatarsService;
 }
コード例 #2
0
 public AuthController(
     UserManager <User> userManager,
     AuthTokenService tokenService,
     AvatarsService avatarsService,
     IMapper mapper
     )
 {
     _userManager    = userManager;
     _tokenService   = tokenService;
     _avatarsService = avatarsService;
     _mapper         = mapper;
 }
コード例 #3
0
 public AccountService(
     WiseContext db,
     BankApi bankApi,
     AvatarsService avatarsService,
     UserManager <User> userManager,
     EmailService emailService,
     IConfiguration config)
 {
     _db             = db;
     _bankApi        = bankApi;
     _avatarsService = avatarsService;
     _userManager    = userManager;
     _emailService   = emailService;
     _config         = config;
 }
コード例 #4
0
 public UsersController(
     UsersService usersService,
     TeamsService teamsService,
     PurchasesService purchasesService,
     UserManager <User> userManager,
     ICurrentUserAccessor currentUser,
     AvatarsService avatarsService,
     IMapper mapper)
 {
     _userManager      = userManager;
     _usersService     = usersService;
     _teamsService     = teamsService;
     _purchasesService = purchasesService;
     _currentUser      = currentUser;
     _mapper           = mapper;
     _avatarsService   = avatarsService;
 }
コード例 #5
0
        public PlayerViewModel(PlayerDocument doc, string myUserId)
        {
            Position     = doc.Position;
            Cash         = doc.Cash;
            Bet          = doc.Bet;
            UserId       = doc.UserId;
            Name         = doc.Name;
            IsMe         = UserId == myUserId;
            CurrentTurn  = doc.CurrentTurn;
            IsSmallBlind = doc.IsSmallBlind;
            IsBigBlind   = doc.IsBigBlind;
            IsInGame     = doc.Cards.Count != 0;
            AvatarUrl    = AvatarsService.GetUrlById(doc.AvatarId);

            if (IsMe)
            {
                Cards = doc.Cards.Select(x => new CardViewModel(x)).ToList();
            }
            else
            {
                Cards = new List <CardViewModel>();
            }
        }
コード例 #6
0
        public ActionResult MyAvatar()
        {
            var user = _users.GetById(UserId);

            return(Json(new { avatarUrl = AvatarsService.GetUrlById(user.AvatarId) }));
        }
コード例 #7
0
 public ProfileController(AvatarsService avatars, UsersViewService users)
 {
     _avatars = avatars;
     _users   = users;
 }
コード例 #8
0
 public AvatarUrlResolver(AvatarsService avatarsService)
 {
     _avatarsService = avatarsService;
 }