コード例 #1
0
 public CreatePostCommandHandler(IDieteticSNSDbContext context, IMapper mapper, IImageService imageService, ICurrentUserService userService)
 {
     _context      = context;
     _mapper       = mapper;
     _imageService = imageService;
     _userService  = userService;
 }
コード例 #2
0
 public CreateCommentLikeCommandHandler(IDieteticSNSDbContext context, IMapper mapper, ICurrentUserService userService, IWallService wallService, IMediator mediator)
 {
     _context     = context;
     _mapper      = mapper;
     _userService = userService;
     _wallService = wallService;
     _mediator    = mediator;
 }
コード例 #3
0
        public CurrentUserService(IHttpContextAccessor httpContextAccessor, IDieteticSNSDbContext context, IWebHostEnvironment hostingEnvironment)
        {
            _httpContextAccessor = httpContextAccessor;
            _context             = context;
            _hostingEnvironment  = hostingEnvironment;

            var id = _httpContextAccessor.HttpContext?.User?.FindFirstValue(ClaimTypes.NameIdentifier);

            if (id != null)
            {
                _user = _context.Users
                        .Include(x => x.Followers)
                        .Include(x => x.Followings)
                        .Include(x => x.Posts)
                        .SingleOrDefault(x => x.Id == int.Parse(id));
            }
        }
コード例 #4
0
 public CreateNotificationCommandHandler(IDieteticSNSDbContext context, IMapper mapper, INotificationService notificationService)
 {
     _context             = context;
     _mapper              = mapper;
     _notificationService = notificationService;
 }
コード例 #5
0
 public UpdatePostCommandHandler(IDieteticSNSDbContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
コード例 #6
0
 public SeedDataCommandHandler(IDieteticSNSDbContext context, UserManager <User> userManager, RoleManager <IdentityRole <int> > roleManager)
 {
     _context     = context;
     _userManager = userManager;
     _roleManager = roleManager;
 }
コード例 #7
0
 public CreateCommentReportCommandHandler(IDieteticSNSDbContext context, IMapper mapper, ICurrentUserService userService)
 {
     _context     = context;
     _mapper      = mapper;
     _userService = userService;
 }
コード例 #8
0
 public UnfollowUserCommandHandler(IDieteticSNSDbContext context, IMediator mediator)
 {
     _context  = context;
     _mediator = mediator;
 }
コード例 #9
0
 public FollowUserCommandHandler(IDieteticSNSDbContext context, IMapper mapper, IMediator mediator)
 {
     _context  = context;
     _mapper   = mapper;
     _mediator = mediator;
 }
コード例 #10
0
 public DeletePostReportsCommandHandler(IDieteticSNSDbContext context)
 {
     _context = context;
 }
コード例 #11
0
 public DeleteNotificationCommandHandler(IDieteticSNSDbContext context)
 {
     _context = context;
 }
コード例 #12
0
 public CreateCountryCommandHandler(IDieteticSNSDbContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
コード例 #13
0
 public BlockUserCommandHandler(IDieteticSNSDbContext context)
 {
     _context = context;
 }
コード例 #14
0
 public DeleteCommentCommandHandler(IDieteticSNSDbContext context)
 {
     _context = context;
 }
コード例 #15
0
 public DeleteAvatarCommandHandler(IDieteticSNSDbContext context, IImageService imageService, ICurrentUserService userService)
 {
     _context      = context;
     _imageService = imageService;
     _userService  = userService;
 }
コード例 #16
0
 public DeletePostCommandHandler(IDieteticSNSDbContext context, IImageService imageService)
 {
     _context      = context;
     _imageService = imageService;
 }
コード例 #17
0
 public ReadNotificationsCommandHandler(IDieteticSNSDbContext context, ICurrentUserService userService)
 {
     _context     = context;
     _userService = userService;
 }
コード例 #18
0
 public UpdateNotificationsCommandHandler(IDieteticSNSDbContext context, IMapper mapper, ICurrentUserService userService)
 {
     _context     = context;
     _mapper      = mapper;
     _userService = userService;
 }