Method TryRead
- Namespace
- MailFathom.Application.Emails.Extraction.Images
- Assembly
- MailFathom.Application.dll
TryRead(ReadOnlySpan<byte>, out ImageAttachmentHeader?, out ImageDescriptionRefusal)
Reads what the octets declare themselves to be, or names why they will not be described.
public static bool TryRead(ReadOnlySpan<byte> content, out ImageAttachmentHeader? header, out ImageDescriptionRefusal refusal)
Parameters
contentReadOnlySpan<byte>The attachment's decoded octets, whole.
headerImageAttachmentHeaderWhat the octets declare, when they declare a supported format readably.
refusalImageDescriptionRefusalWhy no header was read, meaningful only when this returns false.
Returns
Remarks
A markup document is separated from an unrecognized format before any signature is tried, because the two are refused for different reasons and an SVG arriving as an unrecognized format would say nothing about why it will never be admitted.