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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Enums.ContentKinds" Version="11.0.85" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Enums.ContentKinds" Version="11.0.85" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Enums.ContentKinds" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Enums.ContentKinds --version 11.0.85
                    
#r "nuget: Soenneker.Enums.ContentKinds, 11.0.85"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Enums.ContentKinds@11.0.85
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Enums.ContentKinds&version=11.0.85
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Enums.ContentKinds&version=11.0.85
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

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:

  • Json for JSON text
  • XmlOrHtml for markup
  • Text for other plain text
  • Binary for bytes that should not be decoded as text
  • Unknown when 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 Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed

Update dependency Soenneker.Gen.EnumValues to 11.0.67 (#102)