19 lines
580 B
C#
19 lines
580 B
C#
namespace dy.net.storage
|
|
{
|
|
public sealed class StorageReadResult : IAsyncDisposable
|
|
{
|
|
public Stream Stream { get; init; }
|
|
public long? ContentLength { get; init; }
|
|
public string ContentType { get; init; }
|
|
public string ContentRange { get; init; }
|
|
public int StatusCode { get; init; }
|
|
public IAsyncDisposable Owner { get; init; }
|
|
|
|
public async ValueTask DisposeAsync()
|
|
{
|
|
if (Stream != null) await Stream.DisposeAsync();
|
|
if (Owner != null) await Owner.DisposeAsync();
|
|
}
|
|
}
|
|
}
|