Skip to content

AttachmentValidationResult

Namespace AgentPrism · Assembly AgentPrism.Core.dll

The result of validating an attachment.

public readonly struct AttachmentValidationResult

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

Gets the reason shown to the user when invalid.

public string? Error { get; }

string?

Gets whether the content is valid.

public bool IsValid { get; }

bool

The MIME type derived from the magic bytes, when valid.

public string? MediaType { get; }

string?

Creates a failed validation result.

public static AttachmentValidationResult Invalid(string error)

error string

AttachmentValidationResult

Creates a successful validation result.

public static AttachmentValidationResult Valid(string mediaType)

mediaType string

AttachmentValidationResult