Table of Contents

Class MetafileSignature

Namespace
DocWright.Core.Metafiles
Assembly
DocWright.Core.dll

Recognizes metafile payloads from their leading bytes and from the content type a package declared for them.

public static class MetafileSignature
Inheritance
MetafileSignature
Inherited Members

Remarks

Both signals matter and neither is sufficient. A package part's content type is a claim by the document, which hostile input controls; the bytes are what the parser must actually cope with. Callers use Detect(byte[]?) on the bytes and treat the content type only as a hint about whether a payload is worth looking at.

Methods

Detect(byte[]?)

Identifies the container format from the payload bytes.

IsMetafileContentType(string?)

Returns true when the content type names a metafile format, regardless of the bytes.