public async Task <List <MigrationJob> > ScanBuckets() { List <MigrationJob> migrationJobs = new List <MigrationJob>(); string suffixFrom = _configuration.GetValue <string>("BucketKeySuffixOld"); string bucketKeyStart = _bucketPrefix.GetBucketPrefix(suffixFrom); List <string> bucketKeys = await _forgeOSS.GetBucketsAsync(); string AnonymousBucketKeyOld = _resourceProvider.AnonymousBucketKey(suffixFrom); foreach (string bucketKey in bucketKeys) { if (bucketKey.StartsWith(bucketKeyStart) || bucketKey == AnonymousBucketKeyOld ) { await ScanBucket(migrationJobs, bucketKey); } } return(migrationJobs); }