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

        public AzureStorage(IOptions <AppSettingsModel> settings)
        {
            _appSettingsModel = settings.Value;

            //InitAzureStorageConnectAsync().GetAwaiter().GetResult();
        }