namespace FreeSR.Shared { public abstract class Singleton where T : class { private static readonly Lazy instance = new Lazy(() => Activator.CreateInstance(typeof(T), true) as T); public static T Instance => instance.Value; } }