Presnyakova V.V Lab_2 #2

Closed
Victoria_Presnyakova wants to merge 18 commits from Lab_2 into Lab_1
Showing only changes of commit ec7dc9e65a - Show all commits

View File

@ -29,14 +29,12 @@ namespace JewelryStoreFileImplement
"Components", x => x.GetXElement);
public void SaveProducts() => SaveData(Products, ProductFileName,
"Products", x => x.GetXElement);
public void SaveOrders() => SaveData(Orders, OrderFileName, "Orders", x
=> x.GetXElement);
public void SaveOrders() => SaveData(Orders, OrderFileName, "Orders", x => x.GetXElement);
private DataFileSingleton()
{
Components = LoadData(ComponentFileName, "Component", x =>
Component.Create(x)!)!;
Products = LoadData(ProductFileName, "Product", x =>
Product.Create(x)!)!;
Products = LoadData(ProductFileName, "Product", x => Jewel.Create(x)!)!;
Orders = LoadData(OrderFileName, "Order", x => Order.Create(x)!)!;
}
private static List<T>? LoadData<T>(string filename, string xmlNodeName,