Compare commits
2 Commits
c63fa4c74a
...
19e9a4fecd
Author | SHA1 | Date | |
---|---|---|---|
|
19e9a4fecd | ||
|
74e0d2ae9d |
5
.gitignore
vendored
5
.gitignore
vendored
@ -398,3 +398,8 @@ FodyWeavers.xsd
|
||||
# JetBrains Rider
|
||||
*.sln.iml
|
||||
|
||||
/AircraftPlant/ImplementationExtensions/AircraftPlantContracts.dll
|
||||
/AircraftPlant/ImplementationExtensions/AircraftPlantDataModels.dll
|
||||
/AircraftPlant/ImplementationExtensions/AircraftPlantDatabaseImplement.dll
|
||||
/AircraftPlant/ImplementationExtensions/AircraftPlantFileImplement.dll
|
||||
/AircraftPlant/ImplementationExtensions/AircraftPlantListImplement.dll
|
||||
|
@ -22,10 +22,10 @@ namespace AircraftPlantContracts.DI
|
||||
var files = Directory.GetFiles(TryGetImplementationExtensionsFolder(), "*.dll", SearchOption.AllDirectories);
|
||||
foreach (var file in files.Distinct())
|
||||
{
|
||||
Assembly asm = Assembly.LoadFrom(file);
|
||||
Assembly asm = Assembly.LoadFrom(file);
|
||||
foreach (var t in asm.GetExportedTypes())
|
||||
{
|
||||
if (t.IsClass && typeof(IImplementationExtension).IsAssignableFrom(t))
|
||||
if (t.IsClass && typeof(IImplementationExtension).IsAssignableFrom(t))
|
||||
{
|
||||
if (source == null)
|
||||
{
|
||||
@ -34,9 +34,9 @@ namespace AircraftPlantContracts.DI
|
||||
else
|
||||
{
|
||||
var newSource = (IImplementationExtension)Activator.CreateInstance(t)!;
|
||||
if (newSource.Priority > source.Priority)
|
||||
if (newSource.Priority > source.Priority)
|
||||
{
|
||||
source = newSource;
|
||||
source = newSource;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ namespace AircraftPlantDatabaseImplement
|
||||
{
|
||||
public int Priority => 3;
|
||||
|
||||
public void RegisterServices()
|
||||
public void RegisterServices()
|
||||
{
|
||||
DependencyManager.Instance.RegisterType<IClientStorage, ClientStorage>();
|
||||
DependencyManager.Instance.RegisterType<IComponentStorage, ComponentStorage>();
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user