2024-02-28 01:32:56 +04:00
|
|
|
|
using PizzeriaListImplement.Models;
|
|
|
|
|
|
|
|
|
|
namespace PizzeriaListImplement
|
|
|
|
|
{
|
|
|
|
|
public class DataListSingleton
|
|
|
|
|
{
|
|
|
|
|
private static DataListSingleton? _instance;
|
|
|
|
|
public List<Component> Components { get; set; }
|
|
|
|
|
public List<Order> Orders { get; set; }
|
2024-03-11 00:29:19 +04:00
|
|
|
|
public List<Pizza> Pizzas { get; set; }
|
2024-05-07 23:00:38 +04:00
|
|
|
|
public List<Client> Clients { get; set; }
|
2024-02-28 01:32:56 +04:00
|
|
|
|
private DataListSingleton()
|
|
|
|
|
{
|
|
|
|
|
Components = new List<Component>();
|
|
|
|
|
Orders = new List<Order>();
|
2024-03-11 00:29:19 +04:00
|
|
|
|
Pizzas = new List<Pizza>();
|
2024-02-28 01:32:56 +04:00
|
|
|
|
}
|
|
|
|
|
public static DataListSingleton GetInstance()
|
|
|
|
|
{
|
|
|
|
|
if (_instance == null)
|
|
|
|
|
{
|
|
|
|
|
_instance = new DataListSingleton();
|
|
|
|
|
}
|
|
|
|
|
return _instance;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|