Files
modernkeepass/ModernKeePass/Services/SingletonServiceBase.cs

13 lines
285 B
C#
Raw Normal View History

using System;
namespace ModernKeePass.Services
{
public abstract class SingletonServiceBase<T> where T : new()
{
private static readonly Lazy<T> LazyInstance =
new Lazy<T>(() => new T());
public static T Instance => LazyInstance.Value;
}
}