private static async Task <TaskRunner> CreateTaskRunner() { var secretsManager = new AwsSsmSecretsManager(); var connectionString = await secretsManager.Fetch("/parkingrota/ParkingRotaConnectionString"); return(new TaskRunner(connectionString)); }
private async Task EnsureDependenciesCreated() { var secretsManager = new AwsSsmSecretsManager(); if (this.lastServiceRunTimeFetcher == null) { var connectionString = await secretsManager.Fetch("/parkingrota/ParkingRotaMonitorConnectionString"); this.lastServiceRunTimeFetcher = new LastServiceRunTimeFetcher(connectionString); } if (this.emailSender == null) { this.emailSender = new AwsSesEmailSender(secretsManager, new MonitorSystemParameterListRepository()); } if (this.clock == null) { this.clock = SystemClock.Instance; } }