Esempio n. 1
0
 public NotificationHub(IOnlineUsersRepository onlineUsers,
                        IFriendApiAccess friendApiAccess,
                        IMessageApiAccess messageApiService,
                        IPostApiAccess postApiAccess,
                        INotificationApiAccess notificationApiAccess,
                        ILogger <NotificationHub> logger)
 {
     _onlineUsers           = onlineUsers;
     _friendApiAccess       = friendApiAccess;
     _messageApiService     = messageApiService;
     _postApiAccess         = postApiAccess;
     _notificationApiAccess = notificationApiAccess;
     _logger = logger;
 }
 public ProfileController(IHttpContextAccessor httpContextAccessor,
                          IPostApiAccess postApiAccess,
                          INotificationApiAccess notificationApiAccess,
                          IUserApiAccess userApiAccess,
                          ILogger <ProfileController> logger,
                          IMapper mapper,
                          IImagesManager imagesManager)
 {
     _postApiAccess         = postApiAccess;
     _notificationApiAccess = notificationApiAccess;
     _userApiAccess         = userApiAccess;
     _logger        = logger;
     _mapper        = mapper;
     _imagesManager = imagesManager;
     _userApiAccess.AddUserIfNotExist(httpContextAccessor.HttpContext.User).GetAwaiter();
     _userId = httpContextAccessor.HttpContext.User.Claims.FirstOrDefault(x => x.Type == ClaimTypes.NameIdentifier).Value;
 }