Singleton<T>¶
Namespace:
SideXP.Core
Implements a thread-safe version of the Singleton pattern. The goal is to make an instance of a class unique and accessible from anywhere. Note that Singletons are considered as anti-patterns, and may be used only for prototyping quickly or if it's the only solution in your software architecture. The implementation is inspired from: https://jlambert.developpez.com/tutoriels/dotnet/implementation-pattern-singleton-csharp
Constructors¶
Singleton()¶
Default constructor.
Properties¶
Instance¶
Gets the singleton instance of this class.
I¶
Gets the singleton instance of this class.
Methods¶
Init()¶
Called when this object is set as the singleton instance.