/// <summary> /// Ctor: inject dependencies. /// </summary> public ApiController(ILoggerFactory lf, CountryResolver countryResolver, PageProvider pageProvider, Sampler sampler, ResultRepo resultRepo, IConfiguration config) { logger = lf.CreateLogger(GetType().FullName); this.countryResolver = countryResolver; this.pageProvider = pageProvider; this.sampler = sampler; this.resultRepo = resultRepo; exportSecret = config["exportSecret"]; exportPath = config["exportPath"]; }
/// <summary> /// Ctor: infuse dependencies. /// </summary> public IndexController(PageProvider pageProvider, ResultRepo resultRepo, IConfiguration config) { this.pageProvider = pageProvider; this.resultRepo = resultRepo; gaCode = config["gaCode"]; }