Files
OurUmbraco/NotificationsWeb/Singleton.cs
T

21 lines
423 B
C#
Raw Normal View History

2015-02-17 10:23:41 +01:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
2015-02-17 10:39:39 +01:00
namespace NotificationsWeb
2015-02-17 10:23:41 +01:00
{
public class Singleton<T> where T : class, new()
{
Singleton() { }
private static readonly Lazy<T> instance = new Lazy<T>(() => new T());
public static T UniqueInstance
{
get { return instance.Value; }
}
}
}