refactor: Cambiada la estructura de las controladoras
This commit is contained in:
20
Controladora/Singleton.cs
Normal file
20
Controladora/Singleton.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.InteropServices;
|
||||
using Modelo;
|
||||
|
||||
namespace Controladora
|
||||
{
|
||||
public abstract class Singleton<T> where T : new()
|
||||
{
|
||||
// Singleton thread-safe por si quiero usar "Parallel"
|
||||
private static T instance = new T();
|
||||
public static T Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user