Lyo.Common.Metadata
2.0.0
dotnet add package Lyo.Common.Metadata --version 2.0.0
NuGet\Install-Package Lyo.Common.Metadata -Version 2.0.0
<PackageReference Include="Lyo.Common.Metadata" Version="2.0.0" />
<PackageVersion Include="Lyo.Common.Metadata" Version="2.0.0" />
<PackageReference Include="Lyo.Common.Metadata" />
paket add Lyo.Common.Metadata --version 2.0.0
#r "nuget: Lyo.Common.Metadata, 2.0.0"
#:package Lyo.Common.Metadata@2.0.0
#addin nuget:?package=Lyo.Common.Metadata&version=2.0.0
#tool nuget:?package=Lyo.Common.Metadata&version=2.0.0
Lyo.Common.Metadata
The record catalogs that turn the bare enums in Lyo.Common.Core into something descriptive live in Lyo.Common.Metadata: MimeTypeInfo is the IANA media-type catalog, FileTypeInfo maps extensions onto those rows, LanguageCodeInfo knows BCP-47 and ISO 639 codes, LyoTypeInfo is the type picker behind config, job, and filter editors.
Records and the extensions that read them ship together because they depend on each other — LyoTypeInfo uses StringExtensions, and FileTypeInfo.FromMimeType reads MimeTypeInfo. Splitting them would have produced a cycle rather than two packages.
This package references Lyo.Common.Core, so a reference here also gives you the primitives. Namespaces sit under the package name: Lyo.Common.Metadata.Records, .Extensions, and .JsonConverters.
Features
- File and media metadata.
MimeTypeInfois the IANA catalog (Value, aliases,FromValuewhich stripsContent-Typeparameters,HttpContentType).FileTypeInfois the file-type registry: name, extensions, category, and aMimerow. Several file types may share one MIME (Unknown/Bin/Encall useapplication/octet-stream). Video rows cover MP4, MOV, MKV, AVI, MPEG, MPEG-TS, 3GP, and HLS. The two-key envelope suffix isTwoKeyEnvelopeSuffix = "2k";CommonStorageResolutionSuffixesis whatLyo.FileStorageuses when persisted blobs have no explicit metadata. Byte-scale units live onFileSizeUnitInfo. LyoTypeInfo. Type-picker catalog: CLR types (IsClr) plus entries other packages register at startup, withFromType/FromName/ByCategory, widget hints viaLyoTypeEditorKind(including Xml, Regex, and a Formatter hint), synthesizedT[]andList<T>entries for registered elements, legacy aliases,ToJson/TryValidateJson, and an implicit conversion toType.- Language and platform records.
ProgrammingLanguageInfo,LanguageCodeInfo(FromISO639_1,FromBCP_47,FromISO639_3), andSocialPlatformInfo. - Network and protocol records.
HttpStatusCodeInfo,PortInfo(well-known ports withPortCategory,FromName/FromPort/ByCategory, implicitint), andHttpHeaderInfo(RFC + Lyo contract + commonX-names withHttpHeaderCategory/HttpHeaderPresence,FromName/ByCategory, implicitstring). Vendor wire names stay in that vendor’s.Modelspackage. - Geography and geometry.
BoundingBox2DandGeographicInfo(ByCountry,ByState,FromAbbreviation,FromTimeZone). In the split,GeographicInfomoved here fromEnums/: it is a registry record that happened to live beside the enums it keys off. - Enum-to-record bridges (
Extensions/).TypeInfoExtensions(theGetMimeTypeFromExtension/GetFileTypeFromExtension/FromMimeValuefamily),EnumMetadataExtensions(GetStringValue,GetDescription,IsSingleFlag<T>), andLanguageExtensions. - Record converters (
JsonConverters/).SocialPlatformInfoJsonConverterandLanguageCodeInfoJsonConverter, including theirNullable*wrappers. They referenceSystem.Text.Jsondirectly rather than depending onLyo.Common.Json— that indirection is what keeps the two packages from forming a cycle.
Examples
Look up file and MIME data
using Lyo.Common.Core.Enums;
using Lyo.Common.Metadata.Extensions;
using Lyo.Common.Metadata.Records;
FileTypeInfo type = "report.pdf".GetFileTypeFromExtension();
MimeTypeInfo mime = "clip.mkv".GetMimeTypeFromExtension();
string contentType = mime.HttpContentType;
string label = CountryCode.NZ.GetDescription();
Pick a type
using Lyo.Common.Metadata.Records;
// Drives config, job-parameter and query-filter editors.
LyoTypeInfo info = LyoTypeInfo.FromName("int");
Type runtime = LyoTypeInfo.DateTime; // implicit Type
var scalars = LyoTypeInfo.ByCategory(LyoTypeCategory.Scalar);
// Packages register their own non-CLR entries at startup.
LyoTypeInfo.Register(new("cron", LyoTypeCategory.Text, LyoTypeEditorKind.Text));
Records versus enums
Enums live in Lyo.Common.Core; the records that describe them live here. MIME is a catalog (MimeTypeInfo), not an enum: a package that only needs video/mp4 as a string still goes through Metadata. File types point at MIME rows (FileTypeInfo.Mime) so jpg/jpeg share image/jpeg and unknown/bin/enc share application/octet-stream.
Dependencies
Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).
Lyo.Common.Core(direct, lyo)Lyo.Exceptions(direct, lyo)System.Text.Json10.0.5(direct, microsoft, netstandard2.0)Microsoft.Bcl.AsyncInterfaces10.0.5(transitive, microsoft, netstandard2.0)System.Memory4.6.3(transitive, microsoft, netstandard2.0)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Lyo.Common.Core (>= 2.0.0)
- Lyo.Exceptions (>= 2.0.0)
- System.Text.Json (>= 10.0.5)
-
net10.0
- Lyo.Common.Core (>= 2.0.0)
- Lyo.Exceptions (>= 2.0.0)
NuGet packages (69)
Showing the top 5 NuGet packages that depend on Lyo.Common.Metadata:
| Package | Downloads |
|---|---|
|
Lyo.Hashing
Digests, hex encoding, hashing streams, non-cryptographic checksums (CRC/Adler), lightweight file fingerprints (non-security), and optional hashing service. |
|
|
Lyo.DateAndTime
Date and time utilities and services for the Lyo library suite. |
|
|
Lyo.Api.Models
API models and data transfer objects for the Lyo API library suite. |
|
|
Lyo.Compression
A production-ready .NET compression library providing efficient, thread-safe compression for the built-in BCL algorithms (GZip, Deflate, and on net10+ Brotli, ZLib). Additional algorithms (LZ4, LZMA, Snappier, Zstd, BZip2, XZ) ship as separate Lyo.Compression.* addon packages so consumers only pay for what they use. |
|
|
Lyo.Encryption
A production-ready .NET encryption library providing secure, authenticated encryption with support for multiple algorithms (AES-GCM, ChaCha20Poly1305, RSA), key management, and envelope encryption patterns. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0 | 895 | 9/9/2026 |