26 lines
733 B
C#
Raw Normal View History

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; }
public List<Dish> Dishes { 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>();
Dishes = new List<Dish>();
2023-02-07 13:00:02 +04:00
}
public static DataListSingleton GetInstance()
{
if (_instance == null)
{
_instance = new DataListSingleton();
}
return _instance;
}
}
}