コード例 #1
0
 /// <summary>
 /// ValuesController
 /// </summary>
 /// <param name="blogarticleServices"></param>
 /// <param name="mapper"></param>
 /// <param name="advertisementServices"></param>
 /// <param name="love"></param>
 /// <param name="roleModulePermissionServices"></param>
 /// <param name="user"></param>
 /// <param name="passwordLibServices"></param>
 /// <param name="blogApi"></param>
 /// <param name="redisBasketRepository"></param>
 /// <param name="doubanApi"></param>
 public ValuesController(IblogarticleServices blogarticleServices,
                         IMapper mapper, IAdvertisementServices advertisementServices,
                         Love love,
                         IRoleModulePermissionServices roleModulePermissionServices,
                         IUser user, IPasswordLibServices passwordLibServices,
                         IBlogApi blogApi,
                         IRedisBasketRepository redisBasketRepository,
                         IDoubanApi doubanApi)
 {
     // 测试 Authorize 和 mapper
     _mapper = mapper;
     _advertisementServices = advertisementServices;
     _love = love;
     // 测试 Httpcontext
     _user = user;
     _roleModulePermissionServices = roleModulePermissionServices;
     // 测试多库
     _passwordLibServices = passwordLibServices;
     // 测试http请求
     _blogApi = blogApi;
     _redisBasketRepository = redisBasketRepository;
     _doubanApi             = doubanApi;
     // 测试AOP加载顺序,配合 return
     _blogarticleServices = blogarticleServices;
     // 测试redis消息队列
     _blogarticleServices = blogarticleServices;
 }
コード例 #2
0
        public blogarticleService_Should()
        {
            //mockBlogRep.Setup(r => r.Query());

            var container = dI_Test.DICollections();

            blogarticleServices = container.Resolve <IblogarticleServices>();
        }
コード例 #3
0
        public BlogController_Should()
        {
            mockBlogSev.Setup(r => r.Query());


            var container = dI_Test.DICollections();

            blogarticleServices = container.Resolve <IblogarticleServices>();
            blogController      = new BlogController(blogarticleServices, mockLogger.Object);
        }
コード例 #4
0
 public blogarticleController(IblogarticleServices blogarticleServices,
                              ISysUserInfoServices sysUserInfoServices,
                              ILogger <blogarticleController> logger,
                              IUser user,
                              Iblogarticle_tagsServices blogarticle_TagsServices, IMapper mapper)
 {
     _blogarticleServices = blogarticleServices;
     _logger = logger;
     _user   = user;
     _mapper = mapper;
     _blogarticle_TagsServices = blogarticle_TagsServices;
     _sysUserInfoServices      = sysUserInfoServices;
 }
コード例 #5
0
 public UseServiceDIAttribute(ILogger <UseServiceDIAttribute> logger, IblogarticleServices blogarticleServices, string Name = "")
 {
     _logger = logger;
     _blogarticleServices = blogarticleServices;
     _name = Name;
 }
コード例 #6
0
 // 这里可以注入
 public Job1TimedService(IblogarticleServices blogarticleServices)
 {
     _blogarticleServices = blogarticleServices;
 }
コード例 #7
0
 public Job_Blogs_Quartz(IblogarticleServices blogarticleServices, ITasksQzServices tasksQzServices)
 {
     _blogarticleServices = blogarticleServices;
     _tasksQzServices     = tasksQzServices;
 }
コード例 #8
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="blogarticleServices"></param>
 /// <param name="logger"></param>
 public BlogController(IblogarticleServices blogarticleServices, ILogger <BlogController> logger)
 {
     _blogarticleServices = blogarticleServices;
     _logger = logger;
 }