public Functions( IOptions <Secrets.ConnectionStrings> ConnectionStrings, IOptions <Secrets.Config> config, IMyEmail MyEmail, IEmailMI4D MyEmailMI4D, IEmail Email ) { _connStr = ConnectionStrings; _config = config; _email = MyEmail; _emailMI4D = MyEmailMI4D; _data = Email; if (_config.Value.domain == "localhost") { _host = "https://localhost:5075"; } else { _host = "http://web_api:5000"; } _connection = new HubConnectionBuilder() .WithUrl($"{_host}/hubs/webjobs") .WithAutomaticReconnect() .Build() ; Task.Run(() => _connection.StartAsync()).Wait(); }
public EmailsController( ILogger <EmailsController> logger, IHttpContextAccessor httpContextAccessor, IEmailMI4D emailMI4D, IEmail email ) { _logger = logger; _httpContextAccessor = httpContextAccessor; _emailMI4D = emailMI4D; _email = email; }