Interface IStorageClient

Namespace: IndicoV2-Storage
Assembly: IndicoV2-Abstractions-dll

public interface IStorageClient

Methods

GetAsync(Uri, CancellationToken)

Task<Stream> GetAsync(Uri uri, CancellationToken cancellationToken)

Parameters

uri Uri

cancellationToken CancellationToken

Returns

Task[Stream](https://learn-microsoft-com/dotnet/api/system-io-stream)\

Serialize(IEnumerable<IFileMetadata>)

JArray Serialize(IEnumerable<IFileMetadata> filesMetadata)

Parameters

filesMetadata IEnumerable<ifilemetadata>

Returns

JArray

UploadAsync(IEnumerable<string>, CancellationToken)

[Obsolete("On this level it's preferable to use streams instead of paths")]
Task<IEnumerable<IFileMetadata>> UploadAsync(IEnumerable<string> filePaths, CancellationToken cancellationToken)

Parameters

filePaths IEnumerable[string](https://learn-microsoft-com/dotnet/api/system-string)\

cancellationToken CancellationToken

Returns

Task[ienumerable](https://learn-microsoft-com/dotnet/api/system-collections-generic-ienumerable\-1)<[ifilemetadata](indicov2-storage-models-ifilemetadata)\>

UploadAsync(IEnumerable<(string Path, Stream Content)>, CancellationToken)

Task<(string Name, string Meta)[]> UploadAsync(IEnumerable<(string Path, Stream Content)> files, CancellationToken cancellationToken)

Parameters

files IEnumerable<(string Path, Stream Content)>

cancellationToken CancellationToken

Returns

Task<(string Name, string Meta)[]>