예제 #1
0
        private void Clear(AzureStorageSettings settings)
        {
            if (_connectionString == settings.ConnectionString)
            {
                return;
            }

            _logger.LogInformation("ConnectionString changed from '{OriginalConnectionString}' to '{NewConnectionString}'", _connectionString, settings.ConnectionString);
            _storageAccount = CloudStorageAccount.Parse(_connectionString = settings.ConnectionString);
            foreach (var table in _cloudTables)
            {
                var client = CreateClient(table.Key);
                _cloudTables.AddOrUpdate(table.Key, client, (a, b) => client);
            }
        }
예제 #2
0
 public CloudTableProvider(AzureStorageSettings settings, ILogger logger = null)
 {
     _logger         = logger ?? NullLogger.Instance;
     _storageAccount = CloudStorageAccount.Parse(_connectionString = settings.ConnectionString);
 }