using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace FestoDebugger.Service { [Serializable] public class Singleton where T : class, new() { private static readonly Lazy lazy = new Lazy(() => new T(), true); public static T Instance => lazy.Value; } }