2024-02-18 00:35:38 +04:00
|
|
|
|
using FoodOrdersListImplement.Models;
|
|
|
|
|
|
|
|
|
|
namespace FoodOrdersListImplement
|
|
|
|
|
{
|
|
|
|
|
public class DataListSingleton
|
|
|
|
|
{
|
|
|
|
|
private static DataListSingleton? _instance;
|
|
|
|
|
|
|
|
|
|
public List<Component> Components { get; set; }
|
|
|
|
|
|
|
|
|
|
public List<Order> Orders { get; set; }
|
|
|
|
|
|
2024-04-08 12:09:09 +04:00
|
|
|
|
public List<Dish> Dishs { get; set; }
|
|
|
|
|
public List<Client> Clients { get; private set; }
|
2024-02-18 00:35:38 +04:00
|
|
|
|
|
2024-05-05 21:45:07 +04:00
|
|
|
|
public List<Implementer> Implementers { get; set; }
|
|
|
|
|
|
2024-05-06 12:46:59 +04:00
|
|
|
|
public List<MessageInfo> Messages { get; set; }
|
|
|
|
|
|
2024-02-18 00:35:38 +04:00
|
|
|
|
private DataListSingleton()
|
|
|
|
|
{
|
|
|
|
|
Components = new List<Component>();
|
|
|
|
|
Orders = new List<Order>();
|
2024-04-08 12:09:09 +04:00
|
|
|
|
Dishs = new List<Dish>();
|
|
|
|
|
Clients = new List<Client>();
|
2024-05-05 21:45:07 +04:00
|
|
|
|
Implementers = new List<Implementer>();
|
2024-05-06 12:46:59 +04:00
|
|
|
|
Messages = new List<MessageInfo>();
|
2024-02-18 00:35:38 +04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static DataListSingleton GetInstance()
|
|
|
|
|
{
|
|
|
|
|
if (_instance == null)
|
|
|
|
|
{
|
|
|
|
|
_instance = new DataListSingleton();
|
|
|
|
|
}
|
|
|
|
|
return _instance;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|