Unleash client instance as singleton
This commit is contained in:
parent
a345992351
commit
cd7c0be03d
3 changed files with 14 additions and 7 deletions
|
|
@ -19,17 +19,18 @@ namespace isn.Controllers
|
|||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly ApplicationDbContext _dbContext;
|
||||
private readonly IHostingEnvironment _env;
|
||||
private readonly IUnleash _unleashĈlient;
|
||||
|
||||
public HomeController(
|
||||
ApplicationDbContext dbContext,
|
||||
IOptions<UnleashClientSettings> unleashClientSettings,
|
||||
IHostingEnvironment env,
|
||||
IUnleash unleashĈlient,
|
||||
ILogger<HomeController> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
_dbContext = dbContext;
|
||||
_unleashĈlient = env.CreateUnleahClient(unleashClientSettings.Value);
|
||||
_unleashĈlient = unleashĈlient;
|
||||
// _unleashĈlient = env.CreateUnleahClient(unleashClientSettings.Value);
|
||||
}
|
||||
|
||||
public IActionResult Index()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue