示例#1
0
 public CustomersController(IMapper mapper, IAppRepo repo, IConfiguration config, UserManager <User> userManager)
 {
     _userManager = userManager;
     _config      = config;
     _repo        = repo;
     _mapper      = mapper;
 }
示例#2
0
 private AppController(Config config)
 {
     _log    = Logger.New(Path.Combine(config.LogPath, config.LogFile));
     _config = config;
     _repo   = SyncRepo.New(AppRepo.New());
     _api    = WebApi.New(_log);
 }
        public CacheResponseSizeRepo(IAppRepo appRepo = null)
        {
            if (ThisRepo == null)
            {
                MemoryStore.AddAspNetInsightRepo(new ConcurrentBag <AppResponseSize>());
            }

            _appRepo = appRepo ?? new CacheAppRepo();
        }
示例#4
0
 public ResponseInstrumentation(IAppRepo appRepo,
                                IResponseRepo <AppResponseTime> appResponse,
                                IResponseRepo <AppResponseSize> appSize,
                                ILogRepo <ResponseLog> log)
 {
     _appRepo     = appRepo ?? throw new ArgumentNullException(nameof(appRepo));
     _appResponse = appResponse ?? throw new ArgumentNullException(nameof(appResponse));
     _appSize     = appSize ?? throw new ArgumentNullException(nameof(appSize));
     _log         = log ?? throw new ArgumentNullException(nameof(log));
 }
示例#5
0
        public PhotosController(IAppRepo appRepo, IMapper mapper,
                                IOptions <CloudinarySettings> cloudinaryConfig)
        {
            _appRepo          = appRepo;
            _mapper           = mapper;
            _cloudinaryConfig = cloudinaryConfig;

            Account account = new Account(_cloudinaryConfig.Value.CloudName, _cloudinaryConfig.Value.ApiKey, _cloudinaryConfig.Value.ApiSecret);

            _cloudinary = new Cloudinary(account);
        }
示例#6
0
 public override IResponseRepo <AppResponseSize> NewResponseSizeRepo(IAppRepo repo = null)
 {
     if (DefaultAppId == 0)
     {
         var app = repo.GetApp(1);
         app.Id = 0;
         var n = new SQLiteAppRepo().New(app);
         DefaultAppId = n.Id;
     }
     return(new SQLiteResponseSizeRepo());
 }
 public UsersController(IMapper mapper, IAppRepo repo)
 {
     _repo   = repo;
     _mapper = mapper;
 }
示例#8
0
 public ValuesController(IAppRepo appRepo, IMapper mapper)
 {
     _Apprepo = appRepo;
     _mapper  = mapper;
 }
示例#9
0
 public CitiesController(IAppRepo AppRepo, IMapper mapper)
 {
     _AppRepo = AppRepo;
     _mapper  = mapper;
 }
示例#10
0
 public virtual IResponseRepo <AppResponseTime> NewResponseTimeRepo(IAppRepo repo = null)
 {
     DefaultAppId = 123;
     return(new CacheResponseTimeRepo(repo));
 }
示例#11
0
文件: AppRepo.cs 项目: mamasha/tests
 private SyncRepo(IAppRepo target)
 {
     _ = target;
 }
示例#12
0
文件: AppRepo.cs 项目: mamasha/tests
 public static IAppRepo New(IAppRepo target)
 {
     return(new SyncRepo(target));
 }
示例#13
0
 public AppController(ILogger <AppController> logger)
 {
     _logger = logger;
     _repo   = new AppRepo();
 }
 public DetectionController(IAppRepo appRepo)
 {
     _Apprepo = appRepo;
 }
 public UyelerController(IAppRepo appRepo, IMapper mapper, DataContext context)
 {
     _Apprepo = appRepo;
     _mapper  = mapper;
     _context = context;
 }
 public TestModelsController(IAppRepo repo, IMapper mapper)
 {
     this._repo   = repo;
     this._mapper = mapper;
 }