2024-02-24 21:32:11 +04:00
|
|
|
|
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;
|
|
|
|
|
|
2024-02-25 18:07:14 +04:00
|
|
|
|
public List<Food> Foods { get; set; }
|
|
|
|
|
public List<Snack> Snacks { get; set; }
|
|
|
|
|
public List<Order> Orders { get; set; }
|
2024-05-01 21:05:07 +04:00
|
|
|
|
public List<Client> Clients { get; set; }
|
2024-05-13 16:49:39 +04:00
|
|
|
|
public List<Implementer> Implementers { get; set; }
|
2024-02-24 21:32:11 +04:00
|
|
|
|
|
|
|
|
|
private DataListSingleton() {
|
|
|
|
|
Foods = new List<Food>();
|
|
|
|
|
Snacks = new List<Snack>();
|
|
|
|
|
Orders = new List<Order>();
|
2024-05-01 21:05:07 +04:00
|
|
|
|
Clients = new List<Client>();
|
2024-05-13 16:49:39 +04:00
|
|
|
|
Implementers = new List<Implementer>();
|
2024-02-24 21:32:11 +04:00
|
|
|
|
}
|
|
|
|
|
public static DataListSingleton GetInstance() {
|
|
|
|
|
if (_instance == null) _instance = new DataListSingleton();
|
|
|
|
|
return _instance;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|