Soenneker.Enums.ContentKinds
11.0.85
Prefix Reserved
dotnet add package Soenneker.Enums.ContentKinds --version 11.0.85
NuGet\Install-Package Soenneker.Enums.ContentKinds -Version 11.0.85
<PackageReference Include="Soenneker.Enums.ContentKinds" Version="11.0.85" />
<PackageVersion Include="Soenneker.Enums.ContentKinds" Version="11.0.85" />
<PackageReference Include="Soenneker.Enums.ContentKinds" />
paket add Soenneker.Enums.ContentKinds --version 11.0.85
#r "nuget: Soenneker.Enums.ContentKinds, 11.0.85"
#:package Soenneker.Enums.ContentKinds@11.0.85
#addin nuget:?package=Soenneker.Enums.ContentKinds&version=11.0.85
#tool nuget:?package=Soenneker.Enums.ContentKinds&version=11.0.85
Soenneker.Enums.ContentKinds
A string-backed content classification that lets callers choose an appropriate parser without coupling the payload model to a MIME-type library.
Install
dotnet add package Soenneker.Enums.ContentKinds
Usage
using Soenneker.Enums.ContentKinds;
ContentKind kind = ContentKind.Json;
if (!ContentKind.TryFromValue(input, out ContentKind? parsed))
parsed = ContentKind.Unknown;
Available values:
Jsonfor JSON textXmlOrHtmlfor markupTextfor other plain textBinaryfor bytes that should not be decoded as textUnknownwhen no classification is available
The serialized strings exactly match those names. System.Text.Json writes the underlying string and rehydrates the shared static instance. Use TryFromValue for untrusted input; FromValue throws when the value is not defined. Name-based FromName and TryFromName methods are generated as well.
ContentKind does not inspect bytes, validate syntax, distinguish XML from HTML, map MIME types, or choose a character encoding. The producer or consuming application is responsible for assigning the classification and applying size limits before parsing.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Soenneker.Gen.EnumValues (>= 11.0.67)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Enums.ContentKinds:
| Package | Downloads |
|---|---|
|
Soenneker.Extensions.Spans.Readonly.Bytes
A collection of helpful ReadOnlySpan (byte) extension methods |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.85 | 38 | 11/14/2026 |
| 11.0.84 | 12,613 | 11/11/2026 |
| 11.0.83 | 49 | 11/11/2026 |
| 11.0.82 | 107,509 | 11/2/2026 |
| 11.0.81 | 19,262 | 10/26/2026 |
| 11.0.80 | 106 | 10/26/2026 |
| 4.0.79 | 162,610 | 10/15/2026 |
| 4.0.78 | 133 | 10/14/2026 |
| 4.0.77 | 196 | 10/14/2026 |
| 4.0.75 | 168 | 10/14/2026 |
| 4.0.70 | 2,760 | 10/13/2026 |
| 4.0.69 | 5,766 | 10/12/2026 |
| 4.0.67 | 127 | 10/12/2026 |
| 4.0.66 | 41,630 | 10/11/2026 |
| 4.0.65 | 185 | 10/11/2026 |
| 4.0.64 | 159,841 | 9/30/2026 |
| 4.0.63 | 78,292 | 9/25/2026 |
| 4.0.62 | 1,545 | 9/24/2026 |
| 4.0.61 | 97,574 | 9/15/2026 |
| 4.0.60 | 131 | 9/15/2026 |
Update dependency Soenneker.Gen.EnumValues to 11.0.67 (#102)