//IOptionsSnapshot<AppSettingsModel> settings public TimedHostedService(ILogger <TimedHostedService> logger, IOptions <AppSettingsModel> settings, IApplicationLifetime appLifetime, AzureStorage azureStorage) { _logger = logger; _appSettingsModel = settings.Value; _appLifetime = appLifetime; _azureStorage = azureStorage; }
//private CloudStorageAccount storageAccount = null; //private CloudBlobContainer cloudBlobContainer = null; public AzureStorage(IOptions <AppSettingsModel> settings) { _appSettingsModel = settings.Value; //InitAzureStorageConnectAsync().GetAwaiter().GetResult(); }