Add project files.
This commit is contained in:
		| @@ -0,0 +1,33 @@ | ||||
| using Core.Blueprint.DAL.Infrastructure.Contracts; | ||||
| using Core.Blueprint.Domain.Dtos; | ||||
|  | ||||
| namespace Core.Blueprint.DAL.Infrastructure.Repository | ||||
| { | ||||
|     public class SampleImageRepository : ISampleImageRepository | ||||
|     { | ||||
|         private readonly IProxyBlobStorage _proxyBlobStorage; | ||||
|         public SampleImageRepository(IProxyBlobStorage proxyBlobStorage) | ||||
|         { | ||||
|             _proxyBlobStorage = proxyBlobStorage; | ||||
|         } | ||||
|  | ||||
|         public async IAsyncEnumerable<ImageUrlDto> GetAllImagesUrls() | ||||
|         { | ||||
|             await using (var images = _proxyBlobStorage.ListAllItemsAsync().GetAsyncEnumerator()) | ||||
|             { | ||||
|                 await images.MoveNextAsync(); | ||||
|                 yield return images.Current; | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         public async Task<ImageUrlDto> GetFirstImageUrl() | ||||
|         { | ||||
|             return await _proxyBlobStorage.GetFirstImageUrlAsync(); | ||||
|         } | ||||
|  | ||||
|         public async Task<ImageUrlDto> GetUploadUrl() | ||||
|         { | ||||
|             return await _proxyBlobStorage.GetUploadUrl(); | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Sergio Matias Urquin
					Sergio Matias Urquin