Jeff.Jones.JHelpers6 6.0.1

dotnet add package Jeff.Jones.JHelpers6 --version 6.0.1
NuGet\Install-Package Jeff.Jones.JHelpers6 -Version 6.0.1
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="Jeff.Jones.JHelpers6" Version="6.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Jeff.Jones.JHelpers6 --version 6.0.1
#r "nuget: Jeff.Jones.JHelpers6, 6.0.1"
#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.
// Install Jeff.Jones.JHelpers6 as a Cake Addin
#addin nuget:?package=Jeff.Jones.JHelpers6&version=6.0.1

// Install Jeff.Jones.JHelpers6 as a Cake Tool
#tool nuget:?package=Jeff.Jones.JHelpers6&version=6.0.1

JHelpers version 6

Version 6.0.1 Update - changed out the ContextHelper Dictionary<> for ConcurrentDictionary<>.

JHelpers6 is a .NET 6 library component that can be used with any .NET project that uses .NET 6 on any OS that works with .NET 6. It is a library of generally useful methods and functionality that can save a developer from writing code to accomplish these mundane tasks – or worse, have several versions of a method that does the same thing written in multiple places. JHelpers6 is used in my JDAC6 and JLogger6 NuGet packages for that very reason. JHelpers6 is NOT signed as the code is open source. Code for JHelpers6 is found at: https://github.com/MSBassSinger/JHelpers6

Code examples are available in the sample application found at: https://github.com/MSBassSinger/JHelpers_Demo6

NuGet package is found at: https://www.nuget.org/packages/Jeff.Jones.JHelpers6 or by searching with NuGet package manager for "Jeff.Jones.JHelpers6"

ContextMgr

ContextMgr is a thread-safe singleton that can be used to store data in a single place accessible from anywhere, and any thread, in the application. One typical use is to store settings and other runtime values so their sources (file, database, etc.) only have to be read once. Anything that can be defined as a unique String name and a value or reference type of any kind can be kept there. Values are added as a String key name (which must be unique) and any value or reference type, boxed as a dynamic type.

ContextMgr has no initialization, and as a singleton, does not use “new” to be created. The actual instance is dynamically created on the first reference in the code.

In your application’s shutdown code, I recommend adding this line so the ContextMgr disposes of its resources without waiting on the .NET garbage collector.

ContextMgr.Instance.Dispose();

CommonHelpers

This is a static class with a number of useful static methods and extension methods. The JHelpers_Demo6 demo project shows the usage.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.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 Jeff.Jones.JHelpers6:

Package Downloads
Jeff.Jones.JLogger6

A singleton logging component. Simple to use, lots of flexibility. Writes to a user-specified log and path, and optionally sends email. Can also write logs to a SQL Server database. Allows storing log files in Azure File Storage. PProvides an ILogger interface and a bitmask matching ILogger options.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
6.0.1 615 9/12/2022
6.0.0 779 8/13/2022

This project has been made open source, and updated to .NET 6.