Skip to content

TJC-Tools/TJC.Singleton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NuGet Version and Downloads count

This singleton base & factory can be used to instantiate all singletons at once.


  • 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


  • Can be used to instantiate ALL classes that derive from SingletonBase.