PIbd-23-Lisov-N.A-SewingDre.../DressAtelierListImplement/DataListSingleton.cs

32 lines
856 B
C#
Raw Normal View History

using DressAtelierListImplement.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DressAtelierListImplement
{
public class DataListSingleton
{
private static DataListSingleton? _instance;
public List<Material> Components { get; set; }
public List<Order> Orders { get; set; }
2023-02-13 10:07:35 +04:00
public List<Dress> Dresses { get; set; }
private DataListSingleton()
{
Components = new List<Material>();
Orders = new List<Order>();
2023-02-13 10:07:35 +04:00
Dresses = new List<Dress>();
}
public static DataListSingleton GetInstance()
{
if (_instance == null)
{
_instance = new DataListSingleton();
}
return _instance;
}
}
}