コード例 #1
0
        public async Task <IList <I> > GetAllIds()
        {
            var listRequest = new ListObjectsV2Request
            {
                BucketName = _settings.BucketName,
                Prefix     = $"{_settings.KeyPrefix}/",
                Delimiter  = "/"
            };

            ListObjectsV2Response response;

            try
            {
                response = await _s3Client.ListObjectsV2Async(listRequest);
            }
            catch (Exception ex)
            {
                throw new DataAccessException("Error Listing Objects", ex);
            }

            return(response.S3Objects
                   .Select(x => x.Key)
                   .Select(x => x.Split('/').Last())
                   .Select(x => _converter.FromString(x))
                   .ToList());
        }
コード例 #2
0
 public virtual TData Get(string key)
 {
     return(repository.Get(converter.FromString(key)));
 }