PIbd-22_Katysheva_N.E._Pizz.../Pizzeria/PizzeriaListImplement/DataListSingleton.cs

29 lines
824 B
C#
Raw Normal View History

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-06-21 15:38:45 +04:00
Clients = new List<Client>();
2024-02-28 01:32:56 +04:00
}
public static DataListSingleton GetInstance()
{
if (_instance == null)
{
_instance = new DataListSingleton();
}
return _instance;
}
}
}