AttachmentValidationResult
Namespace AgentPrism · Assembly
AgentPrism.Core.dllThe result of validating an attachment.
public readonly struct AttachmentValidationResultInherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Properties
Section titled “Properties”Gets the reason shown to the user when invalid.
public string? Error { get; }Property Value
Section titled “Property Value”IsValid
Section titled “ IsValid”Gets whether the content is valid.
public bool IsValid { get; }Property Value
Section titled “Property Value”MediaType
Section titled “ MediaType”The MIME type derived from the magic bytes, when valid.
public string? MediaType { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Invalid(string)
Section titled “ Invalid(string)”Creates a failed validation result.
public static AttachmentValidationResult Invalid(string error)Parameters
Section titled “Parameters”error string
Returns
Section titled “Returns”Valid(string)
Section titled “ Valid(string)”Creates a successful validation result.
public static AttachmentValidationResult Valid(string mediaType)Parameters
Section titled “Parameters”mediaType string