public TokenController(DbBackupServiceContext context, ITokenManager tokenManager, IConfiguration configuration, IPasswordHelper passwordHelper)
 {
     _Context        = context;
     _TokenManager   = tokenManager;
     _Configuration  = configuration;
     _PasswordHelper = passwordHelper;
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public ComputersController(DbBackupServiceContext context, ITokenManager tokenManager)
 {
     _Context      = context;
     _TokenManager = tokenManager;
 }
Ejemplo n.º 4
0
 public TemplatesController(DbBackupServiceContext context)
 {
     _Context = context;
 }
Ejemplo n.º 5
0
 public AccountsController(DbBackupServiceContext context, ITokenManager tokenManager, IPasswordHelper passwordHelper)
 {
     _Context        = context;
     _TokenManager   = tokenManager;
     _PasswordHelper = passwordHelper;
 }
Ejemplo n.º 6
0
 public JobsController(DbBackupServiceContext context, IConfiguration configuration, ITokenManager tokenManager)
 {
     _Context       = context;
     _Configuration = configuration;
     _TokenManager  = tokenManager;
 }
Ejemplo n.º 7
0
 public TokenManager(IHttpContextAccessor httpContextAccessor, DbBackupServiceContext context, IConfiguration configuration)
 {
     _HttpContextAccessor = httpContextAccessor;
     _Context             = context;
     _Configuration       = configuration;
 }
 public LogController(DbBackupServiceContext context)
 {
     _Context = context;
 }