ListImplement

This commit is contained in:
ShabOl 2024-04-20 23:21:53 +04:00
parent 71e0aec32b
commit 69e0aa3313
7 changed files with 49 additions and 1 deletions

4
.gitignore vendored
View File

@ -398,3 +398,7 @@ FodyWeavers.xsd
# JetBrains Rider
*.sln.iml
# AutoWorkshop assemblies
ImplementationExtensions/*.dll

View File

@ -5,7 +5,7 @@ namespace AutoWorkshopDatabaseImplement.Implements
{
public class ImplementationExtension : IImplementationExtension
{
public int Priority => 3;
public int Priority => 2;
public void RegisterServices()
{

View File

@ -11,4 +11,8 @@
<ProjectReference Include="..\AutoWorkshopDataModels\AutoWorkshopDataModels.csproj" />
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="copy /Y &quot;$(TargetDir)*.dll&quot; &quot;$(SolutionDir)ImplementationExtensions\*.dll&quot;" />
</Target>
</Project>

View File

@ -0,0 +1,17 @@
using AutoWorkshopContracts.StoragesContracts;
namespace AutoWorkshopListImplement.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();
}
}
}

View File

@ -0,0 +1,21 @@
using AutoWorkshopContracts.DI;
using AutoWorkshopContracts.StoragesContracts;
namespace AutoWorkshopListImplement.Implements
{
public class ImplementationExtension : 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<IRepairStorage, RepairStorage>();
DependencyManager.Instance.RegisterType<IBackUpInfo, BackUpInfo>();
}
}
}

View File

@ -6,6 +6,8 @@ namespace AutoWorkshopListImplement.Models
{
public class MessageInfo : IMessageInfoModel
{
public int Id { get; set; }
public string MessageId { get; set; } = string.Empty;
public int? ClientId { get; set; }

View File