33 lines
966 B
C#
33 lines
966 B
C#
using TransportCompanyListImplement.Models;
|
|
|
|
namespace TransportCompanyListImplement
|
|
{
|
|
public class DataListSingleton
|
|
{
|
|
private static DataListSingleton? _instance;
|
|
public List<Cargo> Cargos { get; set; }
|
|
public List<Driver> Drivers { get; set; }
|
|
public List<Point> Points { get; set; }
|
|
public List<Transportation> Transportations { get; set; }
|
|
public List<Transport> Transports { get; set; }
|
|
|
|
private DataListSingleton()
|
|
{
|
|
Cargos = new List<Cargo>();
|
|
Drivers = new List<Driver>();
|
|
Points = new List<Point>();
|
|
Transportations = new List<Transportation>();
|
|
Transports = new List<Transport>();
|
|
}
|
|
|
|
public static DataListSingleton GetInstance()
|
|
{
|
|
if (_instance == null)
|
|
{
|
|
_instance = new DataListSingleton();
|
|
}
|
|
return _instance;
|
|
}
|
|
}
|
|
}
|