Soenneker.Enums.ContentKinds
4.0.55
Prefix Reserved
dotnet add package Soenneker.Enums.ContentKinds --version 4.0.55
NuGet\Install-Package Soenneker.Enums.ContentKinds -Version 4.0.55
<PackageReference Include="Soenneker.Enums.ContentKinds" Version="4.0.55" />
<PackageVersion Include="Soenneker.Enums.ContentKinds" Version="4.0.55" />
<PackageReference Include="Soenneker.Enums.ContentKinds" />
paket add Soenneker.Enums.ContentKinds --version 4.0.55
#r "nuget: Soenneker.Enums.ContentKinds, 4.0.55"
#:package Soenneker.Enums.ContentKinds@4.0.55
#addin nuget:?package=Soenneker.Enums.ContentKinds&version=4.0.55
#tool nuget:?package=Soenneker.Enums.ContentKinds&version=4.0.55
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 | 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. |
-
net10.0
- Soenneker.Gen.EnumValues (>= 4.0.46)
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 |
|---|---|---|
| 4.0.55 | 19,613 | 8/31/2026 |
| 4.0.54 | 27,452 | 8/30/2026 |
| 4.0.53 | 75 | 8/30/2026 |
| 4.0.51 | 153,245 | 8/21/2026 |
| 4.0.50 | 44,016 | 8/18/2026 |
| 4.0.49 | 7,053 | 8/18/2026 |
| 4.0.48 | 139,299 | 8/7/2026 |
| 4.0.47 | 92 | 8/7/2026 |
| 4.0.46 | 47,267 | 7/28/2026 |
| 4.0.45 | 174 | 7/28/2026 |
| 4.0.44 | 192,751 | 7/16/2026 |
| 4.0.43 | 182 | 7/16/2026 |
| 4.0.42 | 152,701 | 7/3/2026 |
| 4.0.41 | 63,889 | 6/19/2026 |
| 4.0.40 | 29,326 | 6/18/2026 |
| 4.0.39 | 219,681 | 6/5/2026 |
| 4.0.38 | 14,615 | 6/5/2026 |
| 4.0.37 | 122 | 6/5/2026 |
| 4.0.36 | 224,815 | 5/1/2026 |
| 4.0.35 | 75,146 | 4/22/2026 |
Update dependency Soenneker.Gen.EnumValues to 4.0.46 (#74)