mvvm to mssql
This commit is contained in:
17
PacticeSolution/MSSQL_MVVM_Sample/Structure/Singleton.cs
Normal file
17
PacticeSolution/MSSQL_MVVM_Sample/Structure/Singleton.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MSSQL_MVVM_Sample.Structure
|
||||
{
|
||||
public class Singleton<T> where T : class, new()
|
||||
{
|
||||
private static readonly Lazy<T> _instnace = new Lazy<T>(() => new T());
|
||||
|
||||
public delegate void ExceptionEventHandler(string id, Exception ex);
|
||||
|
||||
public static T Instance { get { return _instnace.Value; } }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user