2023-02-07 13:00:02 +04:00
|
|
|
|
using FoodOrdersListImplement.Models;
|
|
|
|
|
|
|
|
|
|
namespace FoodOrdersListImplement
|
|
|
|
|
{
|
|
|
|
|
public class DataListSingleton
|
|
|
|
|
{
|
|
|
|
|
private static DataListSingleton? _instance;
|
2023-02-12 10:11:34 +04:00
|
|
|
|
public List<Component> Components { get; set; }
|
2023-02-07 13:00:02 +04:00
|
|
|
|
public List<Order> Orders { get; set; }
|
2023-02-12 10:11:34 +04:00
|
|
|
|
public List<Dish> Dish { get; set; }
|
2023-02-07 13:00:02 +04:00
|
|
|
|
private DataListSingleton()
|
|
|
|
|
{
|
2023-02-12 10:11:34 +04:00
|
|
|
|
Components = new List<Component>();
|
2023-02-07 13:00:02 +04:00
|
|
|
|
Orders = new List<Order>();
|
2023-02-12 10:11:34 +04:00
|
|
|
|
Dish = new List<Dish>();
|
2023-02-07 13:00:02 +04:00
|
|
|
|
}
|
|
|
|
|
public static DataListSingleton GetInstance()
|
|
|
|
|
{
|
|
|
|
|
if (_instance == null)
|
|
|
|
|
{
|
|
|
|
|
_instance = new DataListSingleton();
|
|
|
|
|
}
|
|
|
|
|
return _instance;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|