Внедрена файловая реализация в программу
This commit is contained in:
parent
2a0c31d5c0
commit
9e8a3d4e87
@ -27,10 +27,8 @@ namespace ConfectioneryFileImplement
|
|||||||
|
|
||||||
private DataFileSingleton()
|
private DataFileSingleton()
|
||||||
{
|
{
|
||||||
Components = LoadData(ComponentFileName, "Component", x =>
|
Components = LoadData(ComponentFileName, "Component", x => Component.Create(x)!)!;
|
||||||
Component.Create(x)!)!;
|
Pastries = LoadData(PastryFileName, "Pastry", x => Pastry.Create(x)!)!;
|
||||||
Pastries = LoadData(PastryFileName, "Pastry", x =>
|
|
||||||
Pastry.Create(x)!)!;
|
|
||||||
Orders = LoadData(OrderFileName, "Order", x => Order.Create(x)!)!;
|
Orders = LoadData(OrderFileName, "Order", x => Order.Create(x)!)!;
|
||||||
}
|
}
|
||||||
private static List<T>? LoadData<T>(string filename, string xmlNodeName, Func<XElement, T> selectFunction)
|
private static List<T>? LoadData<T>(string filename, string xmlNodeName, Func<XElement, T> selectFunction)
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\ConfectionaryBusinessLogic\ConfectioneryBusinessLogic.csproj" />
|
<ProjectReference Include="..\ConfectionaryBusinessLogic\ConfectioneryBusinessLogic.csproj" />
|
||||||
|
<ProjectReference Include="..\ConfectionaryFileImplement\ConfectioneryFileImplement.csproj" />
|
||||||
<ProjectReference Include="..\ConfectionaryListImplement\ConfectioneryListImplement.csproj" />
|
<ProjectReference Include="..\ConfectionaryListImplement\ConfectioneryListImplement.csproj" />
|
||||||
<ProjectReference Include="..\ConfectioneryContracts\ConfectioneryContracts.csproj" />
|
<ProjectReference Include="..\ConfectioneryContracts\ConfectioneryContracts.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using ConfectioneryListImplement.Implements;
|
using ConfectioneryFileImplement.Implements;
|
||||||
using ConfectioneryBusinessLogic.BusinessLogics;
|
using ConfectioneryBusinessLogic.BusinessLogics;
|
||||||
using ConfectioneryContracts.BusinessLogicsContracts;
|
using ConfectioneryContracts.BusinessLogicsContracts;
|
||||||
using ConfectioneryContracts.StoragesContract;
|
using ConfectioneryContracts.StoragesContract;
|
||||||
using ConfectioneryListImplement;
|
using ConfectioneryFileImplement;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using NLog.Extensions.Logging;
|
using NLog.Extensions.Logging;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user