Revert "сдала"

This reverts commit c63fa4c74a.
This commit is contained in:
kamilia 2024-05-25 23:39:16 +04:00
parent c63fa4c74a
commit 74e0d2ae9d
2 changed files with 5 additions and 5 deletions

View File

@ -22,10 +22,10 @@ namespace AircraftPlantContracts.DI
var files = Directory.GetFiles(TryGetImplementationExtensionsFolder(), "*.dll", SearchOption.AllDirectories); var files = Directory.GetFiles(TryGetImplementationExtensionsFolder(), "*.dll", SearchOption.AllDirectories);
foreach (var file in files.Distinct()) foreach (var file in files.Distinct())
{ {
Assembly asm = Assembly.LoadFrom(file); Assembly asm = Assembly.LoadFrom(file);
foreach (var t in asm.GetExportedTypes()) foreach (var t in asm.GetExportedTypes())
{ {
if (t.IsClass && typeof(IImplementationExtension).IsAssignableFrom(t)) if (t.IsClass && typeof(IImplementationExtension).IsAssignableFrom(t))
{ {
if (source == null) if (source == null)
{ {
@ -34,9 +34,9 @@ namespace AircraftPlantContracts.DI
else else
{ {
var newSource = (IImplementationExtension)Activator.CreateInstance(t)!; var newSource = (IImplementationExtension)Activator.CreateInstance(t)!;
if (newSource.Priority > source.Priority) if (newSource.Priority > source.Priority)
{ {
source = newSource; source = newSource;
} }
} }
} }

View File

@ -13,7 +13,7 @@ namespace AircraftPlantDatabaseImplement
{ {
public int Priority => 3; public int Priority => 3;
public void RegisterServices() public void RegisterServices()
{ {
DependencyManager.Instance.RegisterType<IClientStorage, ClientStorage>(); DependencyManager.Instance.RegisterType<IClientStorage, ClientStorage>();
DependencyManager.Instance.RegisterType<IComponentStorage, ComponentStorage>(); DependencyManager.Instance.RegisterType<IComponentStorage, ComponentStorage>();