Table of Contents

Class AttachmentDownload

Namespace
Signal.Application.Abstractions
Assembly
Signal.Application.dll

An attachment opened for streaming by OpenReadAsync(string, CancellationToken).

public sealed record AttachmentDownload : IAsyncDisposable, IDisposable, IEquatable<AttachmentDownload>
Inheritance
AttachmentDownload
Implements
Inherited Members

Remarks

Disposing it disposes Content, which releases the underlying HTTP response.

Constructors

AttachmentDownload(Stream, string?, long?)

An attachment opened for streaming by OpenReadAsync(string, CancellationToken).

public AttachmentDownload(Stream Content, string? ContentType, long? Length)

Parameters

Content Stream

The attachment bytes as a forward-only, read-only stream.

ContentType string

The MIME type reported by the API, if any.

Length long?

The size in bytes reported by the API, if known.

Remarks

Disposing it disposes Content, which releases the underlying HTTP response.

Properties

Content

The attachment bytes as a forward-only, read-only stream.

public Stream Content { get; init; }

Property Value

Stream

ContentType

The MIME type reported by the API, if any.

public string? ContentType { get; init; }

Property Value

string

Length

The size in bytes reported by the API, if known.

public long? Length { get; init; }

Property Value

long?

Methods

Dispose()

Disposes Content.

public void Dispose()

DisposeAsync()

Disposes Content.

public ValueTask DisposeAsync()

Returns

ValueTask

A task that completes when the stream is disposed.