PIbd-23_Nevaeva_K.A._Travel.../TravelCompany/TravelCompanyListImplement/DataListSingleton.cs
2023-02-20 08:36:19 +04:00

33 lines
893 B
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TravelCompanyListImplement.Models;
namespace TravelCompanyListImplement
{
internal class DataListSingleton
{
private static DataListSingleton? _instance;
public List<Condition> Conditions { get; set; }
public List<Order> Orders { get; set; }
public List<Travel> Travels { get; set; }
private DataListSingleton()
{
Conditions = new List<Condition>();
Orders = new List<Order>();
Travels = new List<Travel>();
}
public static DataListSingleton GetInstance()
{
if (_instance == null)
{
_instance = new DataListSingleton();
}
return _instance;
}
}
}