public QuestionController(IQuestionService questionService, ICategoryService categoryService, IVoteService voteService) { _questionService = questionService; _categoryService = categoryService; _voteService = voteService; }
public VoteController(IBirthdayPeopleService birthdayPeople, IVoteService voteData, IPresentService presentData, IBirthdayData dbData) { this.birthdayData = birthdayPeople; this.voteData = voteData; this.presentData = presentData; this.dbData = dbData; }
public CountdownController(ICountdownRepository countdownRepository, IVoteService voteService, IContextService contextService) { _countdownRepository = countdownRepository; _voteService = voteService; _contextService = contextService; }
/// <summary> /// Constructor /// </summary> /// <param name="context"></param> /// <param name="settingsService"> </param> /// <param name="emailService"> </param> /// <param name="localizationService"> </param> /// <param name="activityService"> </param> /// <param name="privateMessageService"> </param> /// <param name="membershipUserPointsService"> </param> /// <param name="topicNotificationService"> </param> /// <param name="voteService"> </param> /// <param name="badgeService"> </param> /// <param name="categoryNotificationService"> </param> /// <param name="loggingService"></param> /// <param name="uploadedFileService"></param> /// <param name="postService"></param> /// <param name="pollVoteService"></param> /// <param name="pollAnswerService"></param> /// <param name="pollService"></param> /// <param name="topicService"></param> /// <param name="favouriteService"></param> /// <param name="categoryService"></param> public MembershipService(IMVCForumContext context, ISettingsService settingsService, IEmailService emailService, ILocalizationService localizationService, IActivityService activityService, IPrivateMessageService privateMessageService, IMembershipUserPointsService membershipUserPointsService, ITopicNotificationService topicNotificationService, IVoteService voteService, IBadgeService badgeService, ICategoryNotificationService categoryNotificationService, ILoggingService loggingService, IUploadedFileService uploadedFileService, IPostService postService, IPollVoteService pollVoteService, IPollAnswerService pollAnswerService, IPollService pollService, ITopicService topicService, IFavouriteService favouriteService, ICategoryService categoryService, IPostEditService postEditService) { _settingsService = settingsService; _emailService = emailService; _localizationService = localizationService; _activityService = activityService; _privateMessageService = privateMessageService; _membershipUserPointsService = membershipUserPointsService; _topicNotificationService = topicNotificationService; _voteService = voteService; _badgeService = badgeService; _categoryNotificationService = categoryNotificationService; _loggingService = loggingService; _uploadedFileService = uploadedFileService; _postService = postService; _pollVoteService = pollVoteService; _pollAnswerService = pollAnswerService; _pollService = pollService; _topicService = topicService; _favouriteService = favouriteService; _categoryService = categoryService; _postEditService = postEditService; _context = context as MVCForumContext; }
/// <summary> /// Constructor /// </summary> /// <param name="membershipRepository"> </param> /// <param name="settingsRepository"> </param> /// <param name="emailService"> </param> /// <param name="localizationService"> </param> /// <param name="activityService"> </param> /// <param name="privateMessageService"> </param> /// <param name="membershipUserPointsService"> </param> /// <param name="topicNotificationService"> </param> /// <param name="voteService"> </param> /// <param name="badgeService"> </param> /// <param name="categoryNotificationService"> </param> /// <param name="loggingService"></param> /// <param name="uploadedFileService"></param> /// <param name="postRepository"></param> /// <param name="pollVoteRepository"></param> /// <param name="pollAnswerRepository"></param> /// <param name="pollRepository"></param> /// <param name="topicRepository"></param> /// <param name="favouriteRepository"></param> /// <param name="categoryService"></param> public MembershipService(IMembershipRepository membershipRepository, ISettingsRepository settingsRepository, IEmailService emailService, ILocalizationService localizationService, IActivityService activityService, IPrivateMessageService privateMessageService, IMembershipUserPointsService membershipUserPointsService, ITopicNotificationService topicNotificationService, IVoteService voteService, IBadgeService badgeService, ICategoryNotificationService categoryNotificationService, ILoggingService loggingService, IUploadedFileService uploadedFileService, IPostRepository postRepository, IPollVoteRepository pollVoteRepository, IPollAnswerRepository pollAnswerRepository, IPollRepository pollRepository, ITopicRepository topicRepository, IFavouriteRepository favouriteRepository, ICategoryService categoryService) { _membershipRepository = membershipRepository; _settingsRepository = settingsRepository; _emailService = emailService; _localizationService = localizationService; _activityService = activityService; _privateMessageService = privateMessageService; _membershipUserPointsService = membershipUserPointsService; _topicNotificationService = topicNotificationService; _voteService = voteService; _badgeService = badgeService; _categoryNotificationService = categoryNotificationService; _loggingService = loggingService; _uploadedFileService = uploadedFileService; _postRepository = postRepository; _pollVoteRepository = pollVoteRepository; _pollAnswerRepository = pollAnswerRepository; _pollRepository = pollRepository; _topicRepository = topicRepository; _favouriteRepository = favouriteRepository; _categoryService = categoryService; }
public CommentController(ICommentRepository commentRepository, IVoteService voteService, IContextService contextService) { _commentRepository = commentRepository; _voteService = voteService; _contextService = contextService; }
public void TestsSetup() { AutoMapperConfig.RegisterMappings(); this.votes = ServicesObjectFactory.GetVoteService(); this.controller = new VotesController(this.votes); this.controller.Cache = new HttpCacheService(); }
public void Init() { _api = Substitute.For<IMVCForumAPI>(); _activityService = Substitute.For<IActivityService>(); _privateMessageService = Substitute.For<IPrivateMessageService>(); _membershipUserPointsService = Substitute.For<IMembershipUserPointsService>(); _topicNotificationService = Substitute.For<ITopicNotificationService>(); _voteService = Substitute.For<IVoteService>(); _badgeService = Substitute.For<IBadgeService>(); _categoryNotificationService = Substitute.For<ICategoryNotificationService>(); _loggingService = Substitute.For<ILoggingService>(); }
public SearchController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, ISettingsService settingsService, IPostService postService, ITopicService topicService, IVoteService voteService, IFavouriteService favouriteService, ICategoryService categoryService) : base(loggingService, unitOfWorkManager, membershipService, localizationService, roleService, settingsService) { _postService = postService; _topicsService = topicService; _voteService = voteService; _favouriteService = favouriteService; _categoryService = categoryService; }
public MembersController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, ISettingsService settingsService, IPostService postService, IReportService reportService, IEmailService emailService, IPrivateMessageService privateMessageService, IBannedEmailService bannedEmailService, IBannedWordService bannedWordService, ITopicNotificationService topicNotificationService, IPollAnswerService pollAnswerService, IVoteService voteService, ICategoryService categoryService, ITopicService topicService) : base(loggingService, unitOfWorkManager, membershipService, localizationService, roleService, settingsService) { _postService = postService; _reportService = reportService; _emailService = emailService; _privateMessageService = privateMessageService; _bannedEmailService = bannedEmailService; _bannedWordService = bannedWordService; _categoryService = categoryService; _topicService = topicService; }
public PostService(IMembershipUserPointsService membershipUserPointsService, IVoteService voteService, IFavouriteService favouriteService, IUploadedFileService uploadedFileService, ISettingsService settingsService, IRoleService roleService, IPostRepository postRepository, ITopicRepository topicRepository, ILocalizationService localizationService) { _voteService = voteService; _favouriteService = favouriteService; _uploadedFileService = uploadedFileService; _postRepository = postRepository; _topicRepository = topicRepository; _roleService = roleService; _membershipUserPointsService = membershipUserPointsService; _settingsService = settingsService; _localizationService = localizationService; }
public SearchController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, ISettingsService settingsService, IPostService postService, ITopicService topicService, IVoteService voteService, IFavouriteService favouriteService, ICategoryService categoryService) : base(loggingService, unitOfWorkManager, membershipService, localizationService, roleService, settingsService) { _postService = postService; _topicsService = topicService; _voteService = voteService; _favouriteService = favouriteService; _categoryService = categoryService; LoggedOnUser = UserIsAuthenticated ? MembershipService.GetUser(Username) : null; UsersRole = LoggedOnUser == null ? RoleService.GetRole(AppConstants.GuestRoleName) : LoggedOnUser.Roles.FirstOrDefault(); }
/// <summary> /// Constructor /// </summary> /// <param name="loggingService"> </param> /// <param name="unitOfWorkManager"> </param> /// <param name="membershipService"></param> /// <param name="localizationService"></param> /// <param name="roleService"></param> /// <param name="categoryService"></param> /// <param name="settingsService"> </param> /// <param name="topicService"> </param> /// <param name="categoryNotificationService"> </param> public CategoryController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, ICategoryService categoryService, ISettingsService settingsService, ITopicService topicService, ICategoryNotificationService categoryNotificationService, IPollAnswerService pollAnswerService, ITopicNotificationService topicNotificationService, IVoteService voteService) : base(loggingService, unitOfWorkManager, membershipService, localizationService, roleService, settingsService) { _categoryService = categoryService; _topicService = topicService; _categoryNotificationService = categoryNotificationService; _pollAnswerService = pollAnswerService; _topicNotificationService = topicNotificationService; _voteService = voteService; }
public PostService(IMVCForumContext context,IMembershipUserPointsService membershipUserPointsService, ISettingsService settingsService, IRoleService roleService, ILocalizationService localizationService, IVoteService voteService, IUploadedFileService uploadedFileService, IFavouriteService favouriteService, IConfigService configService, IPostEditService postEditService) { _roleService = roleService; _membershipUserPointsService = membershipUserPointsService; _settingsService = settingsService; _localizationService = localizationService; _voteService = voteService; _uploadedFileService = uploadedFileService; _favouriteService = favouriteService; _configService = configService; _postEditService = postEditService; _context = context as MVCForumContext; }
public PostController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, ITopicService topicService, IPostService postService, ISettingsService settingsService, ICategoryService categoryService, ITopicNotificationService topicNotificationService, IEmailService emailService, IReportService reportService, IBannedWordService bannedWordService, IVoteService voteService, IPostEditService postEditService) : base(loggingService, unitOfWorkManager, membershipService, localizationService, roleService, settingsService) { _topicService = topicService; _postService = postService; _categoryService = categoryService; _topicNotificationService = topicNotificationService; _emailService = emailService; _reportService = reportService; _bannedWordService = bannedWordService; _voteService = voteService; _postEditService = postEditService; }
/// <summary> /// Constructor /// </summary> /// <param name="loggingService"> </param> /// <param name="unitOfWorkManager"> </param> /// <param name="membershipService"></param> /// <param name="localizationService"></param> /// <param name="roleService"></param> /// <param name="categoryService"></param> /// <param name="settingsService"> </param> /// <param name="topicService"> </param> /// <param name="categoryNotificationService"> </param> /// <param name="pollAnswerService"></param> /// <param name="topicNotificationService"></param> /// <param name="voteService"></param> public CategoryController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, ICategoryService categoryService, ISettingsService settingsService, ITopicService topicService, ICategoryNotificationService categoryNotificationService, IPollAnswerService pollAnswerService, ITopicNotificationService topicNotificationService, IVoteService voteService, IRoleService roleService1) : base(loggingService, unitOfWorkManager, membershipService, localizationService, roleService, settingsService) { _categoryService = categoryService; _topicService = topicService; _categoryNotificationService = categoryNotificationService; _pollAnswerService = pollAnswerService; _topicNotificationService = topicNotificationService; _voteService = voteService; _roleService = roleService1; }
public HomeController(IAnswerService answerService, IAnswerDescriptionService answerDescriptionService, IResourcesService resourcesService, IUserService userService, IVoteService voteService, ILoggerFactory loggerFactory, IOptions <AppSettings> appSettings, IHelpItemService helpItemService, ISearchEntryService searchEntryService) { _userService = userService; _answerService = answerService; _answerDescriptionService = answerDescriptionService; _resourcesService = resourcesService; _voteService = voteService; _helpItemService = helpItemService; _appSettings = appSettings; _searchEntryService = searchEntryService; _logger = loggerFactory.CreateLogger <HomeController>(); _logger.LogInformation("created HomeController"); }
public TopicService(IMVCForumContext context, IMembershipUserPointsService membershipUserPointsService, ISettingsService settingsService, ITopicNotificationService topicNotificationService, IVoteService voteService, IUploadedFileService uploadedFileService, IFavouriteService favouriteService, IPostService postService, IRoleService roleService, IPollService pollService, IPollAnswerService pollAnswerService) { _membershipUserPointsService = membershipUserPointsService; _settingsService = settingsService; _topicNotificationService = topicNotificationService; _voteService = voteService; _uploadedFileService = uploadedFileService; _favouriteService = favouriteService; _postService = postService; _roleService = roleService; _pollService = pollService; _pollAnswerService = pollAnswerService; _context = context as MVCForumContext; }
public PostService(IMvcForumContext context, IMembershipUserPointsService membershipUserPointsService, ISettingsService settingsService, IRoleService roleService, IVoteService voteService, IUploadedFileService uploadedFileService, IFavouriteService favouriteService, IConfigService configService, IPostEditService postEditService, IGroupService groupService) { _roleService = roleService; _membershipUserPointsService = membershipUserPointsService; _settingsService = settingsService; _voteService = voteService; _uploadedFileService = uploadedFileService; _favouriteService = favouriteService; _configService = configService; _postEditService = postEditService; _groupService = groupService; _context = context; }
public MembersController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, ISettingsService settingsService, IPostService postService, IReportService reportService, IEmailService emailService, IPrivateMessageService privateMessageService, IBannedEmailService bannedEmailService, IBannedWordService bannedWordService, ITopicNotificationService topicNotificationService, IPollAnswerService pollAnswerService, IVoteService voteService) : base(loggingService, unitOfWorkManager, membershipService, localizationService, roleService, settingsService) { _postService = postService; _reportService = reportService; _emailService = emailService; _privateMessageService = privateMessageService; _bannedEmailService = bannedEmailService; _bannedWordService = bannedWordService; _topicNotificationService = topicNotificationService; _pollAnswerService = pollAnswerService; _voteService = voteService; LoggedOnUser = UserIsAuthenticated ? MembershipService.GetUser(Username) : null; UsersRole = LoggedOnUser == null ? RoleService.GetRole(AppConstants.GuestRoleName) : LoggedOnUser.Roles.FirstOrDefault(); }
public VoteController( ApiSettings settings, ILogger <VoteController> logger, ITransactionCoordinator transactionCoordinator, IVoteService voteService, IApiVoteModelMapper voteModelMapper ) : base(settings, logger, transactionCoordinator, voteService, voteModelMapper) { this.BulkInsertLimit = 250; this.MaxLimit = 1000; this.DefaultLimit = 250; }
public VoteController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, IPostService postService, IVoteService voteService, ISettingsService settingsService, ITopicService topicService, IMembershipUserPointsService membershipUserPointsService, ICacheService cacheService) : base(loggingService, unitOfWorkManager, membershipService, localizationService, roleService, settingsService, cacheService) { _postService = postService; _voteService = voteService; _topicService = topicService; _membershipUserPointsService = membershipUserPointsService; }
/// <summary> /// Constructor /// </summary> /// <param name="loggingService"> </param> /// <param name="unitOfWorkManager"> </param> /// <param name="membershipService"></param> /// <param name="localizationService"></param> /// <param name="roleService"></param> /// <param name="categoryService"></param> /// <param name="settingsService"> </param> /// <param name="topicService"> </param> /// <param name="categoryNotificationService"> </param> public CategoryController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, ICategoryService categoryService, ISettingsService settingsService, ITopicService topicService, ICategoryNotificationService categoryNotificationService, IPollAnswerService pollAnswerService, ITopicNotificationService topicNotificationService, IVoteService voteService) : base(loggingService, unitOfWorkManager, membershipService, localizationService, roleService, settingsService) { _categoryService = categoryService; _topicService = topicService; _categoryNotificationService = categoryNotificationService; _pollAnswerService = pollAnswerService; _topicNotificationService = topicNotificationService; _voteService = voteService; LoggedOnUser = UserIsAuthenticated ? MembershipService.GetUser(Username) : null; UsersRole = LoggedOnUser == null?RoleService.GetRole(AppConstants.GuestRoleName) : LoggedOnUser.Roles.FirstOrDefault(); }
public TopicController(ILoggingService loggingService, IMembershipService membershipService, IRoleService roleService, ITopicService topicService, IPostService postService, ICategoryService categoryService, ILocalizationService localizationService, ISettingsService settingsService, ITopicTagService topicTagService, IPollService pollService, IVoteService voteService, IFavouriteService favouriteService, ICacheService cacheService, IMvcForumContext context, INotificationService notificationService) : base(loggingService, membershipService, localizationService, roleService, settingsService, cacheService, context) { _topicService = topicService; _postService = postService; _categoryService = categoryService; _topicTagService = topicTagService; _pollService = pollService; _voteService = voteService; _favouriteService = favouriteService; _notificationService = notificationService; }
public UserScrubPipe(IVoteService voteService, IBadgeService badgeService, INotificationService notificationService, IPrivateMessageService privateMessageService, IFavouriteService favouriteService, IMembershipUserPointsService membershipUserPointsService, IActivityService activityService, IPollService pollService, ITopicService topicService, ICategoryService categoryService, IPostService postService, ILoggingService loggingService) { _voteService = voteService; _badgeService = badgeService; _notificationService = notificationService; _privateMessageService = privateMessageService; _favouriteService = favouriteService; _membershipUserPointsService = membershipUserPointsService; _activityService = activityService; _pollService = pollService; _topicService = topicService; _categoryService = categoryService; _postService = postService; _loggingService = loggingService; }
public ProblemController( UserManager <UserInfo> userManager, IProblemService problemService, IContestService contestService, IJudgeService judgeService, ILanguageService languageService, IFileService fileService, IVoteService voteService, WebHostDbContext dbContext) { this.userManager = userManager; this.problemService = problemService; this.contestService = contestService; this.judgeService = judgeService; this.languageService = languageService; this.fileService = fileService; this.voteService = voteService; this.dbContext = dbContext; }
public PostController(ILoggingService loggingService, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, ITopicService topicService, IPostService postService, ISettingsService settingsService, ICategoryService categoryService, ITopicNotificationService topicNotificationService, IEmailService emailService, IReportService reportService, IBannedWordService bannedWordService, IVoteService voteService, IPostEditService postEditService, ICacheService cacheService, IMvcForumContext context, IActivityService activityService) : base(loggingService, membershipService, localizationService, roleService, settingsService, cacheService, context) { _topicService = topicService; _postService = postService; _categoryService = categoryService; _topicNotificationService = topicNotificationService; _emailService = emailService; _reportService = reportService; _bannedWordService = bannedWordService; _voteService = voteService; _postEditService = postEditService; _activityService = activityService; }
/// <summary> /// Constructor /// </summary> /// <param name="membershipRepository"> </param> /// <param name="settingsRepository"> </param> /// <param name="emailService"> </param> /// <param name="localizationService"> </param> /// <param name="activityService"> </param> /// <param name="privateMessageService"> </param> /// <param name="membershipUserPointsService"> </param> /// <param name="topicNotificationService"> </param> /// <param name="voteService"> </param> /// <param name="badgeService"> </param> /// <param name="categoryNotificationService"> </param> /// <param name="api"> </param> /// <param name="loggingService"></param> public MembershipService(IMembershipRepository membershipRepository, ISettingsRepository settingsRepository, IEmailService emailService, ILocalizationService localizationService, IActivityService activityService, IPrivateMessageService privateMessageService, IMembershipUserPointsService membershipUserPointsService, ITopicNotificationService topicNotificationService, IVoteService voteService, IBadgeService badgeService, ICategoryNotificationService categoryNotificationService, IMVCForumAPI api, ILoggingService loggingService) { _membershipRepository = membershipRepository; _settingsRepository = settingsRepository; _emailService = emailService; _localizationService = localizationService; _activityService = activityService; _privateMessageService = privateMessageService; _membershipUserPointsService = membershipUserPointsService; _topicNotificationService = topicNotificationService; _voteService = voteService; _badgeService = badgeService; _categoryNotificationService = categoryNotificationService; _api = api; _loggingService = loggingService; }
public WeChatController( ILogger <WeChatController> logger, IWeChatContainer container, IAppService appService, IMenuService menuService, IMediaService mediaService, INewsService newsService, IActivityService activityService, IVoteService voteService) : base(logger) { this.logger = logger; this.app = container.GetApp(); this.appService = appService; this.menuService = menuService; this.mediaService = mediaService; this.newsService = newsService; this.activityService = activityService; this.voteService = voteService; }
public FavouriteController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IMembershipService membershipService, IRoleService roleService, ITopicService topicService, IPostService postService, ICategoryService categoryService, ILocalizationService localizationService, ISettingsService settingsService, ITopicTagService topicTagService, IMembershipUserPointsService membershipUserPointsService, ICategoryNotificationService categoryNotificationService, IEmailService emailService, ITopicNotificationService topicNotificationService, IPollService pollService, IPollAnswerService pollAnswerService, IBannedWordService bannedWordService, IVoteService voteService, IFavouriteService favouriteService, IBadgeService badgeService) : base(loggingService, unitOfWorkManager, membershipService, localizationService, roleService, settingsService) { _topicService = topicService; _postService = postService; _categoryService = categoryService; _topicTagService = topicTagService; _membershipUserPointsService = membershipUserPointsService; _categoryNotificationService = categoryNotificationService; _emailService = emailService; _topicNotificationService = topicNotificationService; _pollService = pollService; _pollAnswerService = pollAnswerService; _bannedWordService = bannedWordService; _voteService = voteService; _favouriteService = favouriteService; _badgeService = badgeService; }
public VoteController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, IPostService postService, IVoteService voteService, ISettingsService settingsService, ITopicService topicService, IMembershipUserPointsService membershipUserPointsService, IBadgeService badgeService) : base(loggingService, unitOfWorkManager, membershipService, localizationService, roleService, settingsService) { _postService = postService; _voteService = voteService; _topicService = topicService; _membershipUserPointsService = membershipUserPointsService; _badgeService = badgeService; LoggedOnUser = UserIsAuthenticated ? MembershipService.GetUser(Username) : null; }
public MembersController(ILoggingService loggingService, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, ISettingsService settingsService, IPostService postService, IReportService reportService, IEmailService emailService, IGroupService GroupService, ITopicService topicService, ICacheService cacheService, INotificationService notificationService, IPollService pollService, IVoteService voteService, IFavouriteService favouriteService, IMvcForumContext context, IGroupInviteService groupInviteService, ISendEmailService sendEmailService, IConfigurationProvider configurationProvider) : base(loggingService, membershipService, localizationService, roleService, settingsService, cacheService, context) { _postService = postService; _reportService = reportService; _emailService = emailService; _groupService = GroupService; _topicService = topicService; _notificationService = notificationService; _pollService = pollService; _voteService = voteService; _favouriteService = favouriteService; _groupInviteService = groupInviteService ?? throw new ArgumentNullException(nameof(groupInviteService)); _sendEmailService = sendEmailService ?? throw new ArgumentNullException(nameof(sendEmailService)); _configurationProvider = configurationProvider ?? throw new ArgumentNullException(nameof(configurationProvider)); }
public UserScrubPipe(IVoteService voteService, INotificationService notificationService, IFavouriteService favouriteService, IMembershipUserPointsService membershipUserPointsService, IActivityService activityService, IPollService pollService, ITopicService topicService, IGroupService groupService, IPostService postService, ILoggingService loggingService) { _voteService = voteService; _notificationService = notificationService; _favouriteService = favouriteService; _membershipUserPointsService = membershipUserPointsService; _activityService = activityService; _pollService = pollService; _topicService = topicService; _groupService = groupService; _postService = postService; _loggingService = loggingService; }
public virtual async void TestUpdate() { var builder = new WebHostBuilder() .UseEnvironment("Production") .UseStartup <TestStartup>(); TestServer testServer = new TestServer(builder); var client = new ApiClient(testServer.CreateClient()); client.SetBearerToken(JWTTestHelper.GenerateBearerToken()); var mapper = new ApiVoteServerModelMapper(); ApplicationDbContext context = testServer.Host.Services.GetService(typeof(ApplicationDbContext)) as ApplicationDbContext; IVoteService service = testServer.Host.Services.GetService(typeof(IVoteService)) as IVoteService; ApiVoteServerResponseModel model = await service.Get(1); ApiVoteClientRequestModel request = mapper.MapServerResponseToClientRequest(model); request.SetProperties(2, DateTime.Parse("1/1/1988 12:00:00 AM"), 1, 1, 1); UpdateResponse <ApiVoteClientResponseModel> updateResponse = await client.VoteUpdateAsync(model.Id, request); context.Entry(context.Set <Vote>().ToList()[0]).Reload(); updateResponse.Record.Should().NotBeNull(); updateResponse.Success.Should().BeTrue(); updateResponse.Record.Id.Should().Be(1); context.Set <Vote>().ToList()[0].BountyAmount.Should().Be(2); context.Set <Vote>().ToList()[0].CreationDate.Should().Be(DateTime.Parse("1/1/1988 12:00:00 AM")); context.Set <Vote>().ToList()[0].PostId.Should().Be(1); context.Set <Vote>().ToList()[0].UserId.Should().Be(1); context.Set <Vote>().ToList()[0].VoteTypeId.Should().Be(1); updateResponse.Record.Id.Should().Be(1); updateResponse.Record.BountyAmount.Should().Be(2); updateResponse.Record.CreationDate.Should().Be(DateTime.Parse("1/1/1988 12:00:00 AM")); updateResponse.Record.PostId.Should().Be(1); updateResponse.Record.UserId.Should().Be(1); updateResponse.Record.VoteTypeId.Should().Be(1); }
public FavouriteController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IMembershipService membershipService, IRoleService roleService, ITopicService topicService, IPostService postService, ICategoryService categoryService, ILocalizationService localizationService, ISettingsService settingsService, ITopicTagService topicTagService, IMembershipUserPointsService membershipUserPointsService, ICategoryNotificationService categoryNotificationService, IEmailService emailService, ITopicNotificationService topicNotificationService, IPollService pollService, IPollAnswerService pollAnswerService, IBannedWordService bannedWordService, IVoteService voteService, IFavouriteService favouriteService) : base(loggingService, unitOfWorkManager, membershipService, localizationService, roleService, settingsService) { _topicService = topicService; _postService = postService; _categoryService = categoryService; _topicTagService = topicTagService; _membershipUserPointsService = membershipUserPointsService; _categoryNotificationService = categoryNotificationService; _emailService = emailService; _topicNotificationService = topicNotificationService; _pollService = pollService; _pollAnswerService = pollAnswerService; _bannedWordService = bannedWordService; _voteService = voteService; _favouriteService = favouriteService; LoggedOnUser = UserIsAuthenticated ? MembershipService.GetUser(Username) : null; UsersRole = LoggedOnUser == null?RoleService.GetRole(AppConstants.GuestRoleName) : LoggedOnUser.Roles.FirstOrDefault(); }
/// <summary> /// Constructor /// </summary> /// <param name="context"></param> /// <param name="settingsService"> </param> /// <param name="emailService"> </param> /// <param name="localizationService"> </param> /// <param name="activityService"> </param> /// <param name="loggingService"></param> /// <param name="cacheService"></param> /// <param name="voteService"></param> /// <param name="badgeService"></param> /// <param name="categoryNotificationService"></param> /// <param name="privateMessageService"></param> /// <param name="favouriteService"></param> public MembershipService(IMvcForumContext context, ISettingsService settingsService, IEmailService emailService, ILocalizationService localizationService, IActivityService activityService, ILoggingService loggingService, ICacheService cacheService, IVoteService voteService, IBadgeService badgeService, ICategoryNotificationService categoryNotificationService, IPrivateMessageService privateMessageService, IFavouriteService favouriteService, ITopicNotificationService topicNotificationService, IMembershipUserPointsService membershipUserPointsService, IPollVoteService pollVoteService, ITopicService topicService, ICategoryService categoryService, IPostService postService) { _settingsService = settingsService; _emailService = emailService; _localizationService = localizationService; _activityService = activityService; _loggingService = loggingService; _cacheService = cacheService; _voteService = voteService; _badgeService = badgeService; _categoryNotificationService = categoryNotificationService; _privateMessageService = privateMessageService; _favouriteService = favouriteService; _topicNotificationService = topicNotificationService; _membershipUserPointsService = membershipUserPointsService; _pollVoteService = pollVoteService; _topicService = topicService; _categoryService = categoryService; _postService = postService; _context = context; }
public FavouriteController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IMembershipService membershipService, IRoleService roleService, ITopicService topicService, IPostService postService, ICategoryService categoryService, ILocalizationService localizationService, ISettingsService settingsService, ITopicTagService topicTagService, IMembershipUserPointsService membershipUserPointsService, ICategoryNotificationService categoryNotificationService, IEmailService emailService, ITopicNotificationService topicNotificationService, IPollService pollService, IPollAnswerService pollAnswerService, IBannedWordService bannedWordService, IVoteService voteService, IFavouriteService favouriteService) : base(loggingService, unitOfWorkManager, membershipService, localizationService, roleService, settingsService) { _topicService = topicService; _postService = postService; _categoryService = categoryService; _topicTagService = topicTagService; _membershipUserPointsService = membershipUserPointsService; _categoryNotificationService = categoryNotificationService; _emailService = emailService; _topicNotificationService = topicNotificationService; _pollService = pollService; _pollAnswerService = pollAnswerService; _bannedWordService = bannedWordService; _voteService = voteService; _favouriteService = favouriteService; LoggedOnUser = UserIsAuthenticated ? MembershipService.GetUser(Username) : null; UsersRole = LoggedOnUser == null ? RoleService.GetRole(AppConstants.GuestRoleName) : LoggedOnUser.Roles.FirstOrDefault(); }
public QuestionService( IQuestionRepository questionRepository, IUserRepository userRepository, IUnitOfWork uow, ICommentService commentService, ICache cache, IVoteRepository voteRepository, IVoteService voteService, ITagService tagService, BaseLimits limits, IMapper mapper) { _questionRepository = questionRepository; _userRepository = userRepository; _uow = uow; _commentService = commentService; _cache = cache; _voteRepository = voteRepository; _voteService = voteService; _tagService = tagService; _limits = limits; _mapper = mapper; }
public RestaurantsControllerTests() { this.dbContext = MockDbContext.GetContext(); this.configuration = new ConfigurationBuilder() .AddJsonFile("settings.json") .Build(); this.restaurantImagesRepository = new EfDeletableEntityRepository <RestaurantImage>(this.dbContext); this.categoryImageRepository = new EfDeletableEntityRepository <CategoryImage>(this.dbContext); this.restaurantRepository = new EfDeletableEntityRepository <Restaurant>(this.dbContext); this.categoryRepository = new EfDeletableEntityRepository <Category>(this.dbContext); this.userRepository = new EfDeletableEntityRepository <ApplicationUser>(this.dbContext); this.favouriteRepository = new EfRepository <FavouriteRestaurant>(this.dbContext); this.voteRepository = new EfRepository <Vote>(this.dbContext); this.commentRepository = new EfDeletableEntityRepository <Comment>(this.dbContext); this.cloudinaryService = new CloudinaryImageService(this.configuration); this.voteService = new VoteService(this.voteRepository); this.commentService = new CommentService(this.commentRepository, this.voteService); this.restaurantImagesService = new RestaurantImageService(this.restaurantImagesRepository, this.cloudinaryService); this.restaurantService = new RestaurantService(this.restaurantRepository, this.restaurantImagesService, this.commentService); this.userImageService = new UserImageService(this.userRepository, this.cloudinaryService); this.categoryImageService = new CategoryImageService(this.categoryImageRepository, this.cloudinaryService); this.categoryService = new CategoryService(this.categoryRepository, this.categoryImageService, this.restaurantService); this.userService = new UserService(this.restaurantService, this.userImageService, this.userRepository); this.favouriteService = new FavouriteService(this.favouriteRepository); var httpContext = new DefaultHttpContext(); var tempData = new TempDataDictionary(httpContext, Mock.Of <ITempDataProvider>()); this.controller = new RestaurantsController(this.restaurantService, this.categoryService, this.userService, this.configuration, this.favouriteService) { TempData = tempData, }; AutoMapperConfig.RegisterMappings(typeof(AllImagesFromRestaurantViewModel).Assembly); }
/// <summary> /// Fill in answer details for content page. /// Reuse the logic between controllers. Also used by AnswerActionController. /// </summary> /// <param name="answer"></param> /// <param name="answerDescriptionService"></param> /// <param name="userManager"></param> /// <param name="voteService"></param> /// <param name="resourcesService"></param> /// <param name="culture"></param> /// <returns></returns> public static AnswerDetailsDto FillInDetails(AnswerDto answer, IAnswerDescriptionService answerDescriptionService, IUserService userService, IVoteService voteService, IResourcesService resourcesService, string culture, string fullDomainName) { // Load answer descriptions // Have to do the list otherwise setting description.UserDisplayName below will not work. var searchResult = answerDescriptionService.FindByAnswerId(answer.Id); List <AnswerDescriptionDto> descriptions = searchResult == null ? null : searchResult.ToList(); // Set the username for each description if (descriptions != null) { foreach (var description in descriptions) { GetUserDisplayName(description, userService); } } // Fill in result var data = new AnswerDetailsDto() { Answer = answer, CommonStrings = resourcesService.GetCommonStrings(culture), Descriptions = descriptions, NumberVotes = voteService.CountAnswerVotes(answer.Id) }; GetUserDisplayName(data.Answer, userService); // Fill in link to this page and other usefull data. data.ThisAnswerLink = LinkingHelper.ConvertAnswerToUrlWithCulture(culture, data.CommonStrings, answer); data.ThisAnswerFullLink = fullDomainName.EndsWith("/") ? fullDomainName.Substring(0, fullDomainName.Length - 1) : fullDomainName + data.ThisAnswerLink; data.ThisAnswerText = LinkingHelper.ConvertAnswerToText(data.CommonStrings, answer); data.ThisAnswerFullLinkEscaped = System.Uri.EscapeDataString(data.ThisAnswerFullLink); return(data); }
/// <summary> /// Constructor /// </summary> /// <param name="loggingService"> </param> /// <param name="membershipService"></param> /// <param name="localizationService"></param> /// <param name="roleService"></param> /// <param name="GroupService"></param> /// <param name="settingsService"> </param> /// <param name="topicService"> </param> /// <param name="cacheService"></param> /// <param name="postService"></param> /// <param name="pollService"></param> /// <param name="voteService"></param> /// <param name="favouriteService"></param> /// <param name="context"></param> /// <param name="notificationService"></param> public GroupController(ILoggingService loggingService, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, IGroupService GroupService, ISettingsService settingsService, ITopicService topicService, ICacheService cacheService, IPostService postService, IPollService pollService, IVoteService voteService, IFavouriteService favouriteService, IMvcForumContext context, INotificationService notificationService, IFeatureManager featureManager, IImageCommand imageCommand) : base(loggingService, membershipService, localizationService, roleService, settingsService, cacheService, context) { _groupService = GroupService; _topicService = topicService; _pollAnswerService = pollService; _voteService = voteService; _favouriteService = favouriteService; _notificationService = notificationService; _postService = postService; _roleService = roleService; _featureManager = featureManager; _localizationService = localizationService; LoggedOnReadOnlyUser = membershipService.GetUser(System.Web.HttpContext.Current.User.Identity.Name, true); _imageCommand = imageCommand ?? throw new ArgumentNullException(nameof(imageCommand)); }
public VotesController(IVoteService voteService, UserManager <ApplicationUser> userManager) { this.voteService = voteService; this.userManager = userManager; }
public GrouchBadge() { _voteService = DependencyResolver.Current.GetService<IVoteService>(); }
public VoteController(IVoteService voteService, CachedUserManager <UserInfo> userManager) { this.voteService = voteService; this.userManager = userManager; }
public VoteController(ILoggerManager logger, voting_dbContext dbContext) { _logger = logger; voteService = new VoteService(dbContext); }
public VoteHub(IVoteService voteService) { _voteService = voteService; }
public VotesController(IVoteService votes) { this.votes = votes; }
public VotesController(IMapper mapper, IVoteService voteService, IApartmentService apartmentService) { this._mapper = mapper; this._voteService = voteService; this._apartmentService = apartmentService; }
public VoteController(IVoteService voteService) { this.voteService = voteService; }
public VoteController(IUserService userService, IVoteService voteService) { this.userService = userService; this.voteService = voteService; }