Table of Contents

Namespace LMKit.Inspection

Classes

AudioFacet

The strongly-typed audio summary of a FileInspection: the fields a media UI binds to directly. Null on non-audio files; individual members are null when the container does not state them. Tag frames beyond these headline fields (album artist, genre, ...) live in Properties.

DocumentFacet

The strongly-typed document summary of a FileInspection: the fields a document UI binds to directly. Null on non-document files; individual members are null when the source does not carry them. Everything else (custom properties, XMP, revision counters, ...) lives in Properties.

FileInspection

The universal result of inspecting a file's metadata: one envelope for ANY format.

Three layers, so the shape never changes as formats are added:

  1. Identity - always populated: Format, MimeType, Family, ByteSize.
  2. Facets - strongly typed per-domain summaries (Image / Video / Audio / Document), null when not applicable. These are what a UI binds to.
  3. Properties - the open bag carrying every extracted field, including ones no facet maps yet. New formats and new tags only ever ADD entries here.

Inspection never throws on content: an unrecognized format still yields the identity layer with Format "unknown", and a malformed file yields whatever could be read plus Warnings.

FileInspector

Universal file metadata inspection: identifies ANY file from its leading magic bytes and extracts its metadata - image EXIF/GPS, video and audio stream summaries, PDF and Office document properties - into one stable FileInspection envelope.

Fast by construction: extractors perform bounded, header-only reads (chunk and box walks, targeted seeks), never a full decode - inspecting a multi-gigabyte video touches kilobytes. Every image format is parsed by the native imaging library (the same per-format parsers the codecs use), which probes headers and metadata without decoding pixels. PDF is routed through the SDK's existing pdfium metadata surface (PdfInfo).

Never throws on content: an unrecognized format still yields the identity layer, and malformed files yield whatever was readable plus Warnings. Only null arguments throw.

FileInspection info = FileInspector.Inspect(File.ReadAllBytes("photo.jpg"), "photo.jpg");
Console.WriteLine($"{info.Format} {info.Image?.Width}x{info.Image?.Height}");
foreach (MetadataProperty p in info.Properties)
    Console.WriteLine($"[{p.Group}] {p.Key} = {p.Value}");
ImageFacet

The strongly-typed image summary of a FileInspection: the fields an image UI binds to directly. Null on non-image files; individual members are null when the source does not carry them. Everything else the extractor saw lives in Properties.

MetadataProperty

One extracted metadata field: a stable Group/Key pair with a typed value. The property bag is the OPEN half of a FileInspection: every field an extractor reads lands here - including fields no typed facet maps yet - so adding formats or tags over time never changes the envelope shape. Groups are lower-case namespaces such as "exif", "gps", "id3", "pdf", "office", or "container".

VideoFacet

The strongly-typed video summary of a FileInspection: the fields a media UI binds to directly. Null on non-video files; individual members are null when the container does not state them. Everything else lives in Properties.

XmpMetadataReader

Flattens an XMP metadata packet (RDF/XML, ISO 16684-1) into prefix-qualified name/value properties: dc:title, pdf:Producer, xmp:CreateDate, photoshop:AuthorsPosition, plus any custom namespaces the packet declares. This is generic file-metadata extraction - the same category as reading a PDF /Info dictionary or an EXIF block - usable on any packet source: a PDF metadata stream, an image sidecar, or the raw packet a container format embeds.

XmpProperty

One property flattened out of an XMP metadata packet: a prefix-qualified Name (e.g. dc:title, xmp:CreateDate, photoshop:AuthorsPosition) and its text Value. Produced by Parse(string).

Enums

FormatFamily

The broad family a file format belongs to. Drives which facet of a FileInspection is populated and how a consumer presents the file (an image viewer, a media player, a document reader, ...).

MetadataProperty.ValueKind

How a property value is typed on the wire.

Share