2023-02-16 08:52:03 +04:00
|
|
|
|
using PizzeriaListImplement.Models;
|
2023-02-12 20:11:02 +04:00
|
|
|
|
|
2023-02-16 08:52:03 +04:00
|
|
|
|
namespace PizzeriaListImplement
|
2023-02-12 20:11:02 +04:00
|
|
|
|
{
|
|
|
|
|
public class DataListSingleton
|
|
|
|
|
{
|
|
|
|
|
private static DataListSingleton? _instance;
|
|
|
|
|
public List<Component> Components { get; set; }
|
|
|
|
|
public List<Order> Orders { get; set; }
|
2023-02-16 08:52:03 +04:00
|
|
|
|
public List<Pizza> Pizzas { get; set; }
|
2023-02-21 02:01:02 +04:00
|
|
|
|
public List<Shop> Shops { get; set; }
|
2023-02-12 20:11:02 +04:00
|
|
|
|
private DataListSingleton()
|
|
|
|
|
{
|
|
|
|
|
Components = new List<Component>();
|
|
|
|
|
Orders = new List<Order>();
|
2023-02-16 08:52:03 +04:00
|
|
|
|
Pizzas = new List<Pizza>();
|
2023-02-21 02:01:02 +04:00
|
|
|
|
Shops = new List<Shop>();
|
2023-02-12 20:11:02 +04:00
|
|
|
|
}
|
|
|
|
|
public static DataListSingleton GetInstance()
|
|
|
|
|
{
|
|
|
|
|
if (_instance == null)
|
|
|
|
|
{
|
|
|
|
|
_instance = new DataListSingleton();
|
|
|
|
|
}
|
|
|
|
|
return _instance;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|