Exemplo n.º 1
0
 public ReplyController(SportNewsDbContext context, IMapper mapper, IReplyService replyService, IPostService postService)
 {
     _context          = context;
     _mapper           = mapper;
     this.replyService = replyService;
     this.postService  = postService;
 }
Exemplo n.º 2
0
 public UserController(IUserService userService, IRoleService roleService, ICommentService commentService, IReplyService replyService)
 {
     _userService    = userService;
     _roleService    = roleService;
     _commentService = commentService;
     _replyService   = replyService;
 }
Exemplo n.º 3
0
        //方式2

        public QuestionController(IQuestionService qeustionService, IReplyService replyService,
                                  ISysGroupService sysGroupService,
                                  IImageInfoService imageInfoService)
        {
            _qeustionService = qeustionService;
            _replyService    = replyService;
        }
Exemplo n.º 4
0
        public virtual async void TestDelete()
        {
            var builder = new WebHostBuilder()
                          .UseEnvironment("Production")
                          .UseStartup <TestStartup>();
            TestServer testServer = new TestServer(builder);
            var        client     = new ApiClient(testServer.CreateClient());

            client.SetBearerToken(JWTTestHelper.GenerateBearerToken());
            ApplicationDbContext context = testServer.Host.Services.GetService(typeof(ApplicationDbContext)) as ApplicationDbContext;

            IReplyService service = testServer.Host.Services.GetService(typeof(IReplyService)) as IReplyService;
            var           model   = new ApiReplyServerRequestModel();

            model.SetProperties("B", DateTime.Parse("1/1/1988 12:00:00 AM"), 1, TimeSpan.Parse("02:00:00"));
            CreateResponse <ApiReplyServerResponseModel> createdResponse = await service.Create(model);

            createdResponse.Success.Should().BeTrue();

            ActionResponse deleteResult = await client.ReplyDeleteAsync(2);

            deleteResult.Success.Should().BeTrue();
            ApiReplyServerResponseModel verifyResponse = await service.Get(2);

            verifyResponse.Should().BeNull();
        }
Exemplo n.º 5
0
        //方式2

        public VideoController(IVideoService videoService, IReplyService replyService,
                               IImageInfoService imageInfoService, IBelongService belongService, IVideoClassService videoClassService)
        {
            _videoService      = videoService;
            _imageService      = imageInfoService;
            _belongService     = belongService;
            _videoClassService = videoClassService;
        }
        public ReplyTests()
        {
            this.InitializeDatabaseAndRepositories();
            this.SeedDatabase();
            this.InitializeMapper();

            this.service = new RepliesService(this.repliesRepository);
        }
Exemplo n.º 7
0
 public CommentService(AppDbContext context, IReplyService replyService, IHostingEnvironment appEnvironment,
                       IRatingService ratingService)
 {
     _context        = context;
     _replyService   = replyService;
     _appEnvironment = appEnvironment;
     _ratingService  = ratingService;
 }
Exemplo n.º 8
0
 public BoardsController(IUserService userService, IBoardService boardService,
                         IPostService postService, IReplyService replyService, IMapper mapper)
 {
     _userService  = userService;
     _boardService = boardService;
     _postService  = postService;
     _replyService = replyService;
     _mapper       = mapper;
 }
Exemplo n.º 9
0
 public PostController(IPaggingService paggingService, IAccountService accountService, IReplyService replyService, IQuoteService quoteService, IForumService forumService, IPostService postService)
     : base(accountService)
 {
     this.paggingService = paggingService;
     this.replyService   = replyService;
     this.quoteService   = quoteService;
     this.forumService   = forumService;
     this.postService    = postService;
 }
 /// <summary>
 /// Feed Controller constructor
 /// </summary>
 /// <param name="serviceProvider"></param>
 public FeedController(IServiceProvider serviceProvider)
 {
     _feedServices       = serviceProvider.GetRequiredService <IFeedService>();
     _complaintsServices = serviceProvider.GetRequiredService <IComplaintService>();
     _repliesServices    = serviceProvider.GetRequiredService <IReplyService>();
     _ratingsServices    = serviceProvider.GetRequiredService <IRatingService>();
     _commentsService    = serviceProvider.GetRequiredService <ICommentService>();
     _userManager        = serviceProvider.GetRequiredService <UserManager <User> >();
 }
Exemplo n.º 11
0
 public SettingsService(IMapper mapper, IDbService dbService, IReplyService replyService, IQuoteService quoteService, IReportService reportService, IMessageService messageService, UserManager <ForumUser> userManager)
     : base(mapper, dbService)
 {
     this.replyService   = replyService;
     this.quoteService   = quoteService;
     this.reportService  = reportService;
     this.messageService = messageService;
     this.userManager    = userManager;
 }
Exemplo n.º 12
0
 public ReplyController(
     IMapper mapper,
     IReplyService replyService,
     IUserService userService)
 {
     _mapper       = mapper ?? throw new ArgumentNullException(nameof(mapper));
     _replyService = replyService ?? throw new ArgumentNullException(nameof(replyService));
     _userService  = userService ?? throw new ArgumentNullException(nameof(userService));
 }
Exemplo n.º 13
0
 public ReplyController(
     IPostService postService,
     IReplyService replyService,
     UserManager <ApplicationUser> userManager)
 {
     this.postService  = postService;
     this.replyService = replyService;
     this.userManager  = userManager;
 }
Exemplo n.º 14
0
 public InitData(ISysUserService sysUserService,
                 IServiceProviderService serviceProviderService,
                 IEvaluationOrderService evaluationOrderService,
                 IReplyService replyService)
 {
     this._sysUserService         = sysUserService;
     this._serviceProviderService = serviceProviderService;
     this._evaluationOrderService = evaluationOrderService;
     this._replyService           = replyService;
 }
Exemplo n.º 15
0
        public ReplyServiceTests(BaseUnitTest fixture)
        {
            this.dbService = fixture.Provider.GetService(typeof(IDbService)) as IDbService;

            this.mapper = fixture.Provider.GetService(typeof(IMapper)) as IMapper;

            this.replyService = fixture.Provider.GetService(typeof(IReplyService)) as IReplyService;

            this.SeedDb();
        }
Exemplo n.º 16
0
 public QuoteController(
     IUserService userService,
     IMapper mapper,
     IQuoteService quoteService,
     IReplyService replyService)
     : base(userService, mapper)
 {
     this.quoteService = quoteService;
     this.replyService = replyService;
 }
Exemplo n.º 17
0
 public ReplyController(IReplyService replyService,
                        IPathGenerator pathGenerator,
                        IFileStorage fileStorage,
                        IStorageService storageService)
 {
     _replyService   = replyService;
     _pathGenerator  = pathGenerator;
     _fileStorage    = fileStorage;
     _storageService = storageService;
 }
Exemplo n.º 18
0
 public ReplyController(
     IUserService userService,
     IMapper mapper,
     IPostService postService,
     IReplyService replyService)
     : base(userService, mapper)
 {
     this.postService  = postService;
     this.replyService = replyService;
 }
Exemplo n.º 19
0
 public EvaluationController(IServiceProviderService serviceProvider,
                             IServiceProviderService serviceProviderService,
                             IEvaluationOrderService evaluationOrderService,
                             IReplyService replyService,
                             ISysUserService sysUserService)
 {
     this._serviceProviderService = serviceProviderService;
     this._evaluationOrderService = evaluationOrderService;
     this._replyService           = replyService;
     this._sysUserService         = sysUserService;
 }
Exemplo n.º 20
0
 public HomeworkController(IUserService userService, IUserContext userContext, ISettingService settingService, IRoleService roleService, IPermissionService permissionService, ISMSService smsService, ICommentService commentService, IReplyService replyService)
 {
     this._userService       = userService;
     this._userContext       = userContext;
     this._settingService    = settingService;
     this._roleService       = roleService;
     this._permissionService = permissionService;
     this._smsService        = smsService;
     this._commentService    = commentService;
     this._replyService      = replyService;
 }
 public ClassRoomDivisionController(IUserService userService, IUserContext userContext, ISettingService settingService, IRoleService roleService, IPermissionService permissionService, ISMSService smsService, ICommentService commentService, IReplyService replyService, IPictureService pictureService)
 {
     this._userService       = userService;
     this._userContext       = userContext;
     this._settingService    = settingService;
     this._roleService       = roleService;
     this._permissionService = permissionService;
     this._smsService        = smsService;
     this._commentService    = commentService;
     this._replyService      = replyService;
     this._pictureService    = pictureService;
 }
Exemplo n.º 22
0
 public AssessmentController(IUserService userService, IUserContext userContext, ISettingService settingService, IRoleService roleService, IPermissionService permissionService, ISMSService smsService, ICommentService commentService, IReplyService replyService, IUrlHelper urlHelper)
 {
     this._userService       = userService;
     this._userContext       = userContext;
     this._settingService    = settingService;
     this._roleService       = roleService;
     this._permissionService = permissionService;
     this._smsService        = smsService;
     this._commentService    = commentService;
     this._replyService      = replyService;
     this._urlHelper         = urlHelper;
 }
Exemplo n.º 23
0
 public AbstractReplyController(
     ApiSettings settings,
     ILogger <AbstractReplyController> logger,
     ITransactionCoordinator transactionCoordinator,
     IReplyService replyService,
     IApiReplyModelMapper replyModelMapper
     )
     : base(settings, logger, transactionCoordinator)
 {
     this.ReplyService     = replyService;
     this.ReplyModelMapper = replyModelMapper;
 }
Exemplo n.º 24
0
 public HomeController(ICategoryService categoryService, ICommentService commentService, IMarkService markService, IPostService postService, IProfileService profileService, IReplyService replyService, IRoleService roleService, ITopicService topicService, IUserService userService)
 {
     this.categoryService = categoryService;
     this.commentService  = commentService;
     this.markService     = markService;
     this.postService     = postService;
     this.profileService  = profileService;
     this.replyService    = replyService;
     this.roleService     = roleService;
     this.topicService    = topicService;
     this.userService     = userService;
 }
Exemplo n.º 25
0
 public AdminController(
     IPostService postService, ICategoryService categoryService, ICommentService commentService,
     IReplyService replyService, IUserService userService, IRoleService roleService,
     IBanService banService)
 {
     _postService     = postService;
     _categoryService = categoryService;
     _commentService  = commentService;
     _replyService    = replyService;
     _userService     = userService;
     _roleService     = roleService;
     _banService      = banService;
 }
Exemplo n.º 26
0
 public EmployeeController(IUserService userService, IPictureService pictureService, IUserContext userContext, ISliderService sliderService, ISettingService settingService, ISMSService smsService, IVideoService videoService, ICommentService commentService, IReplyService replyService, IBlogService blogService)
 {
     this._userService    = userService;
     this._pictureService = pictureService;
     this._userContext    = userContext;
     this._sliderService  = sliderService;
     this._settingService = settingService;
     this._smsService     = smsService;
     this._videoService   = videoService;
     this._commentService = commentService;
     this._replyService   = replyService;
     this._blogService    = blogService;
 }
Exemplo n.º 27
0
 public studentController(IActivityService _activityService,
                          IStudentService _studentService, ICourseService _courseService,
                          IReplyService _replyService, ICommentService _commentService,
                          IStudyService _studyService, IAssignmentService _assignmentService)
 {
     this._activityService   = _activityService;
     this._studentService    = _studentService;
     this._courseService     = _courseService;
     this._replyService      = _replyService;
     this._commentService    = _commentService;
     this._studyService      = _studyService;
     this._assignmentService = _assignmentService;
 }
 public ProductCategoryController(IUserService userService, IUserContext userContext, ISettingService settingService, IRoleService roleService, IPermissionService permissionService, ISMSService smsService, ICommentService commentService, IReplyService replyService, IPictureService pictureService, IUrlService urlService)
 {
     this._userService       = userService;
     this._userContext       = userContext;
     this._settingService    = settingService;
     this._roleService       = roleService;
     this._permissionService = permissionService;
     this._smsService        = smsService;
     this._commentService    = commentService;
     this._replyService      = replyService;
     this._pictureService    = pictureService;
     this._urlService        = urlService;
 }
Exemplo n.º 29
0
 public RepliesController(
     IUserService userService,
     IReplyService replyService,
     IImageService imageService,
     IMapper mapper,
     IOptions <AppSettings> appSettings)
 {
     _userService  = userService;
     _replyService = replyService;
     _imageService = imageService;
     _mapper       = mapper;
     _appSettings  = appSettings.Value;
 }
Exemplo n.º 30
0
 public officeController(ICollegeService _collegeService, IDepartmentService _depertmentService,
                         IStudentService _studentService, ICourseService _courseService,
                         ILecturerService _lecturerService, IReplyService _replyService,
                         ICommentService _commentService, IStudyService _studyService)
 {
     this._collegeService    = _collegeService;
     this._departmentService = _depertmentService;
     this._studentService    = _studentService;
     this._courseService     = _courseService;
     this._lecturerService   = _lecturerService;
     this._replyService      = _replyService;
     this._commentService    = _commentService;
     this._studyService      = _studyService;
 }
Exemplo n.º 31
0
 public BotServices(ILoggingService loggingService,
     IEventService eventService,
     ITickerService tickerService,
     IDefenceService defenceService, 
     INewsService newsService,
     IKarmaService karmaService,
     IReplyService replyService,
     IStatsService statsService,
     IServerService serverService,
     IUrlService urlService,
     IJobService jobs)
 {
     Logging = loggingService;
     Events = eventService;
     Ticker = tickerService;
     Defence = defenceService;
     News = newsService;
     Karma = karmaService;
     AI = replyService;
     Stats = statsService;
     Server = serverService;
     Tools = urlService;
     Jobs = jobs;
 }