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
                    
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="4.0.55" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Enums.ContentKinds" Version="4.0.55" />
                    
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 4.0.55
                    
#r "nuget: Soenneker.Enums.ContentKinds, 4.0.55"
                    
#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@4.0.55
                    
#: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=4.0.55
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Enums.ContentKinds&version=4.0.55
                    
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 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. 
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
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
Loading failed

Update dependency Soenneker.Gen.EnumValues to 4.0.46 (#74)