/// <summary> /// 注入 /// </summary> /// <param name="articleServices"></param> /// <param name="categoryServices"></param> /// <param name="mapper"></param> public ArticlesController(IArticleServices articleServices, IArticleCategoryServices categoryServices, ICommentServices commentServices, IMapper mapper) { _articleServices = articleServices; _categoryServices = categoryServices; _commentServices = commentServices; _mapper = mapper; }
public EfCommentManager(IRepository <Comment> repository, IMapper mapper, IArticleServices articleServices, IUserServices userServices) : base(repository) { _repository = repository; _mapper = mapper; _articleServices = articleServices; _userServices = userServices; }
public ArticleController(PagingMetadataHelper pagingMetadataHelper, IArticleServices articleServices, IMapper mapper) : base(pagingMetadataHelper) { this.pagingMetadataHelper = pagingMetadataHelper; this.articleServices = articleServices; this.mapper = mapper; }
public ReservationController(IArticleServices articleServices, IReservationServices reservationServices, IMapper mapper) { _reservationServices = reservationServices; _mapper = mapper; }
public ArticlesController(IArticleServices iArticleServices, IPetServices iPetServices, IImageServices iImageServices, IUserServices iUserServices, IUserAuthInfoServices iUserAuthInfoServices) { _iArticleServices = iArticleServices; _iPetServices = iPetServices; _iImageServices = iImageServices; _iUserServices = iUserServices; _iUserAuthInfoServices = iUserAuthInfoServices; }
public ArticlesController( IArticleServices articlesServices, ICivilizationServices civilizationServices, ICategoryServices categoryServices) { this.articlesServices = articlesServices; this.civilizationServices = civilizationServices; this.categoryServices = categoryServices; }
public UserAuthInfosController(IUserServices iUserServices, IUserAuthInfoServices iUserAuthInfoServices, IOTPServices iOtpServices, IPetServices iPetServices, IArticleServices iArticleServices, IImageServices iImageServices) { _iUserServices = iUserServices; _iUserAuthInfoServices = iUserAuthInfoServices; _iOtpServices = iOtpServices; _iPetServices = iPetServices; _iArticleServices = iArticleServices; _iImageServices = iImageServices; }
public CommentController(IArticleServices articleServices, ICommentServices commentServices, IMapper mapper) { _articleServices = articleServices; _commentServices = commentServices; _mapper = mapper; }
public HomeController(ApplicationUserManager userManager, ApplicationDbContext dbContext, IArticleServices articleService) { Guard.WhenArgument(userManager, "userManager").IsNull().Throw(); Guard.WhenArgument(dbContext, "dbContext").IsNull().Throw(); Guard.WhenArgument(articleService, "articleService").IsNull().Throw(); this.userManager = userManager; this.dbContext = dbContext; this.articleService = articleService; }
public AdminController(ApplicationUserManager userManager, IArticleServices articleService, IEventService eventService) { Guard.WhenArgument(userManager, "userManager").IsNull().Throw(); Guard.WhenArgument(articleService, "articleService").IsNull().Throw(); Guard.WhenArgument(eventService, "eventService").IsNull().Throw(); this.userManager = userManager; this.articleService = articleService; this.eventService = eventService; }
public void IndexTest() { IArticleServices articleService = IoCHelper.Resolve <IArticleServices>(); AjaxController target = new AjaxController(articleService); // TODO: 初始化为适当的值 string jsoncallback = string.Empty; // TODO: 初始化为适当的值 ActionResult expected = null; // TODO: 初始化为适当的值 ActionResult actual; actual = target.Index(jsoncallback); Assert.AreEqual(expected, actual); Assert.Inconclusive("验证此测试方法的正确性。"); }
public HomeController(ILogger <HomeController> logger, IArticleServices articleServices, ICategoryServices categoryServices, IAuthorServices authorServices, ISliderServices sliderServices, INewsServices newsServices, INCategoryServices nCategoryServices, IActivitiesServices activitiesServices, IVideoServices videoServices) { _logger = logger; _articleServices = articleServices; _categoryServices = categoryServices; _authorServices = authorServices; _sliderServices = sliderServices; _newsServices = newsServices; _nCategoryServices = nCategoryServices; _activitiesServices = activitiesServices; _videoServices = videoServices; }
//Rol İşlemleri //private RoleManager<IdentityRole> _roleManager; //private UserManager<User> _UserManager; public AdminController(IArticleServices articleServices, IHostingEnvironment env, ICategoryServices categoryServices, IAuthorServices authorServices, INewsServices newsServices, INCategoryServices nCategoryServices, IVideoServices videoServices, ISliderServices sliderServices, IActivitiesServices activitiesServices) { _articleServices = articleServices; _categoryServices = categoryServices; _authorServices = authorServices; _newsServices = newsServices; _nCategoryServices = nCategoryServices; _videoServices = videoServices; _sliderServices = sliderServices; _activitiesServices = activitiesServices; //_roleManager = IdentityRole; //_UserManager = userManager; _env = env; }
public void NewArcitleTest() { IArticleServices article = IoCHelper.Resolve <IArticleServices>("articleServices"); BlogArticle model = new BlogArticle(); int expected = 0; int actual = 0; model.Title = "测试标题" + new Random().Next(100000, 999999).ToString(); model.IsTop = true; model.Content = "这里是内容--ArticleServices--NewArcitleTest"; model.PublishTime = DateTime.Now; model.CreateTime = DateTime.Now; model.UpdateTime = DateTime.Now; actual = article.NewArcitle(model, 2); Assert.IsTrue(expected < actual); }
/// <summary> /// 为控制器添加构造函数,方便IoC自动装配 /// </summary> /// <param name="articleService"></param> public AjaxController(IArticleServices articleService) { _articleService = articleService; }
public ArticlesController(IAncientCivilizationsData data, IArticleServices articlesServices, IPictureServices pictureServices) : base(data) { this.articleServices = articlesServices; this.pictureServices = pictureServices; }
public ArticleController(IArticleServices articleServices, IPollServices pollService) { _articleServices = articleServices; _pollServices = pollService; }
public ArticleTakeViewComponent(IArticleServices ArticleServices) { this._ArticleServices = ArticleServices; }
//private readonly IArticleTagsServices _articleTagServices; public ArticleController(IArticleServices articleServices) { _articleServices = articleServices; //_articleTagServices = articleTagsServices; }
public ArticleController(IArticleServices articleService) { _articleServices = articleService; }
public EfArticleFavoriteManager(IRepository <ArticleFavorite> repository, IArticleServices articleServices, IUserServices userServices) : base(repository) { _repository = repository; _articleServices = articleServices; _userServices = userServices; }
/// <summary> /// 为控制器添加构造函数,方便IoC自动装配 /// </summary> /// <param name="articleService"></param> public BlogController(IArticleServices articleService) { _articleService = articleService; }
public ArticleController(IArticleServices articleService, ICategoryServices categoryService) { _articleService = articleService; _categoryService = categoryService; }
public ArticlesController(IArticleServices articleServices) { _articleServices = articleServices; }
public ArticleController(IArticleServices articleService) { Guard.WhenArgument(articleService, "articleService").IsNull().Throw(); this.articleService = articleService; }