Add project files.

This commit is contained in:
Sergio Matias Urquin
2025-04-29 18:39:57 -06:00
parent 116793710f
commit 6358f5f199
110 changed files with 4484 additions and 0 deletions

View File

@@ -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();
}
}
}