ISEbd-22_Baygulov_A.A._Sush.../SushiBar/SushiBarListImplement/DataListSingleton.cs

38 lines
994 B
C#
Raw Permalink Normal View History

using SushiBarListImplement.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SushiBarListImplement
{
2024-05-22 22:23:36 +04:00
public class DataListSingleton
{
private static DataListSingleton? _instance;
public List<Component> Components { get; set; }
public List<Order> Orders { get; set; }
public List<Sushi> Sushis { get; set; }
public List<Client> Clients { get; set; }
public List<Implementer> Implementers { get; set; }
2024-06-01 16:27:44 +04:00
public List<MessageInfo> Messages { get; set; }
private DataListSingleton()
2024-05-22 22:23:36 +04:00
{
Components = new List<Component>();
Orders = new List<Order>();
Sushis = new List<Sushi>();
Clients = new List<Client>();
Implementers = new List<Implementer>();
2024-06-01 16:27:44 +04:00
Messages = new List<MessageInfo>();
}
2024-05-22 22:23:36 +04:00
public static DataListSingleton GetInstance()
{
if (_instance == null)
{
_instance = new DataListSingleton();
}
return _instance;
}
}
}