This commit is contained in:
Danil Markov 2023-04-21 13:56:13 +04:00
parent 2419d6a9f7
commit cb8fb410b3

View File

@ -27,7 +27,7 @@ namespace LawFirmFileImplement
{ {
Blanks = LoadData(BlankFileName, "Blank", x => Blank.Create(x)!)!; Blanks = LoadData(BlankFileName, "Blank", x => Blank.Create(x)!)!;
Documents = LoadData(DocumentFileName, "Document", x => Document.Create(x)!)!; Documents = LoadData(DocumentFileName, "Document", x => Document.Create(x)!)!;
Orders = new List<Order>(); Orders = LoadData(OrderFileName, "Order", x => Order.Create(x)!)!;
} }
private static List<T>? LoadData<T>(string filename, string xmlNodeName, private static List<T>? LoadData<T>(string filename, string xmlNodeName,
Func<XElement, T> selectFunction) Func<XElement, T> selectFunction)