устала я уже, добавила реализации где надо и не надо, разобралась вроде с файловым хранилищем
This commit is contained in:
parent
3072692dbe
commit
54854a1ac0
@ -3,7 +3,7 @@ namespace SushiBarContracts.BindingModel
|
||||
{
|
||||
public class MessageInfoBindingModel : IMessageInfoModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int Id => throw new NotImplementedException();
|
||||
public string MessageId { get; set; } = string.Empty;
|
||||
|
||||
public int? ClientId { get; set; }
|
||||
|
@ -6,7 +6,7 @@ namespace SushiBarContracts.ViewModels
|
||||
public class MessageInfoViewModel : IMessageInfoModel
|
||||
{
|
||||
[Column(visible: false)]
|
||||
public int Id { get; set; }
|
||||
public int Id => throw new NotImplementedException();
|
||||
|
||||
[Column(visible: false)]
|
||||
public string MessageId { get; set; } = string.Empty;
|
||||
|
@ -6,7 +6,7 @@ namespace SushiBarDatabaseImplement
|
||||
{
|
||||
public class DatabaseImplementationException : IImplementationExtension
|
||||
{
|
||||
public int Priority => 1;
|
||||
public int Priority => 2;
|
||||
public void RegisterServices()
|
||||
{
|
||||
DependencyManager.Instance.RegisterType<IClientStorage, ClientStorage>();
|
||||
|
@ -10,8 +10,7 @@ namespace SushiBarDatabaseImplement.Models
|
||||
[DataContract]
|
||||
public class MessageInfo : IMessageInfoModel
|
||||
{
|
||||
[NotMapped]
|
||||
public int Id { get; set; }
|
||||
public int Id => throw new NotImplementedException();
|
||||
|
||||
[DataMember]
|
||||
[Key]
|
||||
|
@ -20,7 +20,6 @@
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SushiBarContracts\SushiBarContracts.csproj" />
|
||||
<ProjectReference Include="..\SushiBarDataModels\SushiBarDataModels.csproj" />
|
||||
<ProjectReference Include="..\SushiBarListImplements\SushiBarListImplements.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="AfterBuild">
|
||||
|
@ -4,9 +4,9 @@ using SushiBarFileImplement.Implements;
|
||||
|
||||
namespace SushiBarFileImplement
|
||||
{
|
||||
public class ListImplementationExtension : IImplementationExtension
|
||||
public class FileImplementationExtension : IImplementationExtension
|
||||
{
|
||||
public int Priority => 0;
|
||||
public int Priority => 1;
|
||||
public void RegisterServices()
|
||||
{
|
||||
DependencyManager.Instance.RegisterType<IClientStorage, ClientStorage>();
|
@ -9,8 +9,7 @@ namespace SushiBarFileImplement.Models
|
||||
[DataContract]
|
||||
public class MessageInfo : IMessageInfoModel
|
||||
{
|
||||
[DataMember]
|
||||
public int Id { get; set; }
|
||||
public int Id => throw new NotImplementedException();
|
||||
[DataMember]
|
||||
public string MessageId { get; set; } = string.Empty;
|
||||
|
||||
|
@ -16,9 +16,7 @@
|
||||
<ProjectReference Include="..\SushiBarDataModels\SushiBarDataModels.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="copy /Y "$(TargetDir)*.dll" "$(SolutionDir)ImplementationExtensions\*.dll"" />
|
||||
|
||||
<Target Name="AfterBuild">
|
||||
<Exec Command="copy /Y "$(TargetDir)*.dll" "\SushiBar\ImplementationExtentions"" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
22
SushiBarListImplements/Implements/BackUpInfo.cs
Normal file
22
SushiBarListImplements/Implements/BackUpInfo.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using SushiBarContracts.StoragesContracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SushiBarListImplements.Implements
|
||||
{
|
||||
public class BackUpInfo : IBackUpInfo
|
||||
{
|
||||
public List<T>? GetList<T>() where T : class, new()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Type? GetTypeByModelInterface(string modelInterfaceName)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
using SushiBarContracts.BindingModel;
|
||||
using SushiBarContracts.SearchModel;
|
||||
using SushiBarContracts.StoragesContracts;
|
||||
using SushiBarContracts.ViewModels;
|
||||
using SushiBarListImplement;
|
||||
using SushiBarListImplements.Models;
|
||||
@ -11,7 +12,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace SushiBarListImplements.Implements
|
||||
{
|
||||
public class ClientStorage
|
||||
public class ClientStorage : IClientStorage
|
||||
{
|
||||
private readonly DataListSingleton _source;
|
||||
public ClientStorage()
|
||||
|
22
SushiBarListImplements/ListImplementationExtention.cs
Normal file
22
SushiBarListImplements/ListImplementationExtention.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using SushiBarContracts.DI;
|
||||
using SushiBarContracts.StoragesContracts;
|
||||
using SushiBarListImplements.Implements;
|
||||
|
||||
namespace SushiBarListImplements
|
||||
{
|
||||
public class ListImplementationExtention : IImplementationExtension
|
||||
{
|
||||
public int Priority => 0;
|
||||
|
||||
public void RegisterServices()
|
||||
{
|
||||
DependencyManager.Instance.RegisterType<IClientStorage, ClientStorage>();
|
||||
DependencyManager.Instance.RegisterType<IComponentStorage, ComponentStorage>();
|
||||
DependencyManager.Instance.RegisterType<IImplementerStorage, ImplementerStorage>();
|
||||
DependencyManager.Instance.RegisterType<IMessageInfoStorage, MessageInfoStorage>();
|
||||
DependencyManager.Instance.RegisterType<IOrderStorage, OrderStorage>();
|
||||
DependencyManager.Instance.RegisterType<ISushiStorage, SushiStorage>();
|
||||
DependencyManager.Instance.RegisterType<IBackUpInfo, BackUpInfo>();
|
||||
}
|
||||
}
|
||||
}
|
@ -16,4 +16,8 @@
|
||||
<ProjectReference Include="..\SushiBarDataModels\SushiBarDataModels.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="AfterBuild">
|
||||
<Exec Command="copy /Y "$(TargetDir)*.dll" "\SushiBar\ImplementationExtentions"" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user