mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-04-12 15:33:32 +08:00
16 lines
419 B
C#
16 lines
419 B
C#
using System;
|
|
using System.Threading;
|
|
|
|
namespace MicaSetup.Design.Converters;
|
|
|
|
public abstract class SingletonConverterBase<TConverter> : ConverterBase
|
|
where TConverter : new()
|
|
{
|
|
private static readonly Lazy<TConverter> InstanceConstructor = new(() =>
|
|
{
|
|
return new TConverter();
|
|
}, LazyThreadSafetyMode.PublicationOnly);
|
|
|
|
public static TConverter Instance => InstanceConstructor.Value;
|
|
}
|