TJC.Singleton
0.3.1
See the version list below for details.
dotnet add package TJC.Singleton --version 0.3.1
NuGet\Install-Package TJC.Singleton -Version 0.3.1
<PackageReference Include="TJC.Singleton" Version="0.3.1" />
paket add TJC.Singleton --version 0.3.1
#r "nuget: TJC.Singleton, 0.3.1"
// Install TJC.Singleton as a Cake Addin #addin nuget:?package=TJC.Singleton&version=0.3.1 // Install TJC.Singleton as a Cake Tool #tool nuget:?package=TJC.Singleton&version=0.3.1
<a href="https://github.com/TJC-Tools/TJC.Singleton/tags"> <img alt="GitHub Tag" src="https://img.shields.io/github/v/tag/TJC-Tools/TJC.Singleton?style=for-the-badge&logo=tag&logoColor=white&labelColor=24292f&color=blue" /> </a>
<a href="https://github.com/TJC-Tools/TJC.Singleton/releases/latest"> <img alt="GitHub Release" src="https://img.shields.io/github/v/release/TJC-Tools/TJC.Singleton?style=for-the-badge&logo=starship&logoColor=D9E0EE&labelColor=302D41&&color=green&include_prerelease&sort=semver" /> </a>
<a href="https://www.nuget.org/packages/TJC.Singleton"> <img alt="NuGet Version" src="https://img.shields.io/nuget/v/TJC.Singleton?style=for-the-badge&logo=nuget&logoColor=white&labelColor=004880&color=blue" /> </a>
<br/>
<a href="https://www.nuget.org/packages/TJC.Singleton"> <img alt="NuGet Downloads" src="https://img.shields.io/nuget/dt/TJC.Singleton?style=for-the-badge&logo=nuget&logoColor=white&labelColor=004880&color=yellow" /> </a>
<a href="https://github.com/TJC-Tools/TJC.Singleton"> <img alt="Repository Size" src="https://img.shields.io/github/repo-size/TJC-Tools/TJC.Singleton?style=for-the-badge&logo=files&logoColor=white&labelColor=24292f&color=orange" /> </a>
<br/>
<a href="https://www.nuget.org/packages/TJC.Singleton"> <img alt="Last commit" src="https://img.shields.io/github/last-commit/TJC-Tools/TJC.Singleton?style=for-the-badge&logo=git&logoColor=D9E0EE&labelColor=302D41&color=mediumpurple"/> </a>
<a href="LICENSE"> <img alt="License" src="https://img.shields.io/github/license/TJC-Tools/TJC.Singleton.svg?style=for-the-badge&logo=balance-scale&logoColor=white&labelColor=333333&color=blueviolet" /> </a>
This Singleton base & factory can be used to instantiate all Singletons at once.
SingletonBase
- Ensures that only one instance of a derived class will exist.
- This is implemented in a thread-safe way using Lazy.
- It also ensures that the derived class has a private or protected constructor by throwing an exception at run-time.
Examples
- This mock class shows a example use-case.
SingletonFactory
- Can be used to instantiate ALL classes that derive from SingletonBase.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
-
net8.0
- No dependencies.
NuGet packages (5)
Showing the top 5 NuGet packages that depend on TJC.Singleton:
Package | Downloads |
---|---|
TJC.Collection.Core
Collection of NuGet Packages |
|
TJC.ConsoleApplication
Console Application Utilities |
|
TJC.GUI
Graphical User Interface Extensions |
|
TJC.MVVM
Model-View-ViewModel |
|
TJC.VersionExtensions
Version Extensions |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.5.3 | 271 | 11/15/2024 |
0.5.2 | 458 | 11/10/2024 |
0.5.1 | 367 | 11/5/2024 |
0.5.0 | 334 | 11/5/2024 |
0.4.1 | 484 | 10/26/2024 |
0.4.0 | 1,128 | 10/20/2024 |
0.3.2 | 476 | 10/20/2024 |
0.3.1 | 397 | 10/16/2024 |
0.3.0 | 2,202 | 10/10/2024 |
0.2.0 | 376 | 10/9/2024 |
0.1.10 | 651 | 10/2/2024 |
0.1.9 | 314 | 9/29/2024 |
0.1.8 | 953 | 9/5/2024 |
0.1.7 | 386 | 9/5/2024 |
0.1.6 | 286 | 9/4/2024 |
0.1.5 | 105 | 9/3/2024 |
0.1.4 | 1,055 | 6/10/2024 |
0.1.3 | 91 | 6/2/2024 |
0.1.2 | 106 | 6/2/2024 |
0.1.1 | 106 | 5/31/2024 |
0.1.0 | 116 | 5/31/2024 |