Илья Федотов 64ba40c90c Base.02
2024-05-01 21:05:07 +04:00

31 lines
861 B
C#

using DinerListImplement.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DinerListImplement
{
internal class DataListSingleton
{
public static DataListSingleton? _instance;
public List<Food> Foods { get; set; }
public List<Snack> Snacks { get; set; }
public List<Order> Orders { get; set; }
public List<Client> Clients { get; set; }
private DataListSingleton() {
Foods = new List<Food>();
Snacks = new List<Snack>();
Orders = new List<Order>();
Clients = new List<Client>();
}
public static DataListSingleton GetInstance() {
if (_instance == null) _instance = new DataListSingleton();
return _instance;
}
}
}