Skip to content

AttachmentContent

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

The content of a new attachment to be saved into the store.

public sealed class AttachmentContent

objectAttachmentContent

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

The content is carried already read into memory, because it stays under the size limit (20 MB by default); the store layer does not deal with streaming. The type itself is not a record: the AttachmentContent.Data field can be large, and the generated ToString and equality comparison must not copy the whole content by accident.

public AttachmentContent()

Gets the actor that uploaded it, or null when it is unknown.

public string? CreatedBy { get; init; }

string?

Gets the raw content.

public required ReadOnlyMemory<byte> Data { get; init; }

ReadOnlyMemory<byte>

Gets the original file name.

public required string FileName { get; init; }

string

Gets the validated MIME type.

public required string MediaType { get; init; }

string

Gets the run that produced the attachment. null for a user upload.

public Guid? RunId { get; init; }

Guid?

Gets the session the attachment is bound to. null for an upload without a session.

public string? SessionId { get; init; }

string?

Gets the tenant the attachment will belong to.

public required string TenantId { get; init; }

string