![]() |
VOOZH | about |
dotnet add package Plinth.Common --version 1.8.1
NuGet\Install-Package Plinth.Common -Version 1.8.1
<PackageReference Include="Plinth.Common" Version="1.8.1" />
<PackageVersion Include="Plinth.Common" Version="1.8.1" />Directory.Packages.props
<PackageReference Include="Plinth.Common" />Project file
paket add Plinth.Common --version 1.8.1
#r "nuget: Plinth.Common, 1.8.1"
#:package Plinth.Common@1.8.1
#addin nuget:?package=Plinth.Common&version=1.8.1Install as a Cake Addin
#tool nuget:?package=Plinth.Common&version=1.8.1Install as a Cake Tool
A set of generic utilities, extensions, and enhancements for dotnet applications
Extensions for atomic GetOrCreate on Microsoft.Extensions.Caching.Memory memory caches Example:
IMemoryCache memCache = MemoryCacheUtil.Create();
await memCache.GetOrCreateAtomicMaxDurationAsync(
"key", TimeSpan.FromMinutes(2), async () => await LoadValue());
👉 MemoryCacheUtil.Create() is a shorthand method for creating a new IMemoryCache.
// values are case insensitive
var set = new CaseInsensitiveHashSet<string>() { "abc", "ABC" };
set.Contains("aBc"); // true
// LINQ extension
var set = items.Where(...).Select(...).ToCaseInsensitiveHashSet();
// keys are case insensitive
var dict = new CaseInsensitiveDictionary<string, int>() { ["abc"] = 5 };
dict["ABC"]; // 5
dict.ContainsKey("aBc"); // true
// LINQ extension
var dict = items.Where(...).Select(...).ToCaseInsensitiveDictionary(v => v.ID);
// default dictionary, easy counting
var dict = new DefaultDictionary<string, int>(0);
dict["a"]++; // dict["a"] now is 1
// default dictionary, easy multi maps
var dict = new DefaultDictionary<string, ISet<int>>(() => new HashSet<int>());
dict["a"].Add(7); // "a" has a set with (7) in it
Handy constants for Content Types
ContentTypes.ApplicationJson ⇒ "application/json; charset=utf-8"
Logical exceptions for common API return values. Allows for separation between logic and api projects
A variety of useful extensions to common classes
.GetValueOrDefault().IsNullOrEmpty() and .Many()using (log.LogExecTiming("some code"))
{
... some code ...
log.Debug("action");
}
// logs
[CTX-6540F] : Starting some code #52400089
[CTX-6540F] : action
[CTX-6540F] : some code #52400089 Took: 00.00.00.274472
.ToBytes() and .ToBytesAsync().ChangeType<T>() as various .To{Type}OrNull()StaticLogManager.GetLogger() to retrieve a static logger for the current classRequestTraceId and RequestTraceProperties singletons for passing data through the entire call stack (including across HTTP boundaries)LogTrace ⇒ TraceLogDebug ⇒ DebugLogInformation ⇒ InfoLogWarning ⇒ WarnLogError ⇒ ErrorLogCritical ⇒ Critical or FatalAn enhanced version of Omu.ValueInjecter for easy object to object mapping Allows for deeply nested Field to Field mapping (including Lists, Sets, and Dictionaries)
A set of static utilities
Convert.ToHexStringLower() and Convert.FromHexString() instead. HexUtil methods still function on .NET 8.0 and earlier.FindExecutableHome() which can find your project root at runtimeJoin() method similar to Path.Combine()| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 5 NuGet packages that depend on Plinth.Common:
| Package | Downloads |
|---|---|
|
Plinth.Serialization
JSON/XML/etc object serialization |
|
|
Plinth.Security
Security, Cryptography, and Token Utilities |
|
|
Plinth.HttpApiClient.Common
Shared objects for HTTP Api Client frameworks |
|
|
Plinth.HttpApiClient
HTTP Api Client framework built on MS HttpClient |
|
|
Plinth.AspNetCore
Plinth ASP.NET Core Services Utilities |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 1.8.1 | 5,885 | 12/11/2025 | |
| 1.8.0 | 4,414 | 11/13/2025 | |
| 1.8.0-b211.72089fd9 | 299 | 11/12/2025 | |
| 1.7.4 | 14,927 | 8/6/2025 | |
| 1.7.3 | 641 | 8/2/2025 | |
| 1.7.2 | 10,012 | 3/16/2025 | |
| 1.7.1 | 1,955 | 12/12/2024 | |
| 1.7.0 | 12,686 | 11/12/2024 | |
| 1.6.6 | 1,641 | 11/8/2024 | |
| 1.6.5 | 5,261 | 8/31/2024 | |
| 1.6.4 | 1,215 | 8/2/2024 | |
| 1.6.3 | 14,672 | 5/15/2024 | |
| 1.6.2 | 2,062 | 2/16/2024 | |
| 1.6.1 | 10,021 | 1/5/2024 | |
| 1.6.0 | 3,878 | 11/30/2023 | |
| 1.5.10-b186.aca976b4 | 184 | 11/30/2023 | 1.5.10-b186.aca976b4 is deprecated because it is no longer maintained. |
| 1.5.9 | 5,401 | 11/29/2023 | 1.5.9 is deprecated because it is no longer maintained. |
| 1.5.9-b174.64153841 | 625 | 11/23/2023 | 1.5.9-b174.64153841 is deprecated because it is no longer maintained. |
| 1.5.9-b172.dfc6e7bd | 194 | 11/17/2023 | 1.5.9-b172.dfc6e7bd is deprecated because it is no longer maintained. |
| 1.5.9-b171.4e2b92e2 | 266 | 11/4/2023 | 1.5.9-b171.4e2b92e2 is deprecated because it is no longer maintained. |
net10.0 support