namespace ScreenConnect; public abstract class NativeLibrarySingleton where T : class where TAssemblyMarker : Singleton { private static T instance; public static T Instance { get { if (instance == null) { lock (typeof(NativeLibrarySingleton)) { if (instance == null) { instance = NativeLibrary.LoadProxy(Singleton.Instance.GetType()); } } } return instance; } } }