public TokenController(DbBackupServiceContext context, ITokenManager tokenManager, IConfiguration configuration, IPasswordHelper passwordHelper) { _Context = context; _TokenManager = tokenManager; _Configuration = configuration; _PasswordHelper = passwordHelper; }
private void DoWork(object state) { using var scope = _ScopeFactory.CreateScope(); _Context = scope.ServiceProvider.GetRequiredService <DbBackupServiceContext>(); var toSend = WriteMail(); var accounts = new List <string>(); foreach (var account in scope.ServiceProvider.GetRequiredService <DbBackupServiceContext>().Accounts.ToList()) { if (account.Admin) { try { toSend.To.Add(account.Email); } catch (Exception e) { } } } _SmtpClient.Send(toSend); }
public ComputersController(DbBackupServiceContext context, ITokenManager tokenManager) { _Context = context; _TokenManager = tokenManager; }
public TemplatesController(DbBackupServiceContext context) { _Context = context; }
public AccountsController(DbBackupServiceContext context, ITokenManager tokenManager, IPasswordHelper passwordHelper) { _Context = context; _TokenManager = tokenManager; _PasswordHelper = passwordHelper; }
public JobsController(DbBackupServiceContext context, IConfiguration configuration, ITokenManager tokenManager) { _Context = context; _Configuration = configuration; _TokenManager = tokenManager; }
public TokenManager(IHttpContextAccessor httpContextAccessor, DbBackupServiceContext context, IConfiguration configuration) { _HttpContextAccessor = httpContextAccessor; _Context = context; _Configuration = configuration; }
public LogController(DbBackupServiceContext context) { _Context = context; }