Skip to content

Commit

Permalink
BROKERS: Adds AssemblyBroker
Browse files Browse the repository at this point in the history
  • Loading branch information
LBoullosa committed May 22, 2024
1 parent 7d61937 commit aa4aac2
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 0 deletions.
14 changes: 14 additions & 0 deletions STX.SPAL.Core/Brokers/Assemblies/AssemblyBroker.Assemblies.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// ----------------------------------------------------------------------------------
// Copyright (c) The Standard Organization: A coalition of the Good-Hearted Engineers
// ----------------------------------------------------------------------------------

using System.Reflection;

namespace STX.SPAL.Core.Brokers.Assemblies
{
internal partial class AssemblyBroker
{
public Assembly GetAssembly(string assemblyPath) =>
Assembly.LoadFrom(assemblyPath);
}
}
19 changes: 19 additions & 0 deletions STX.SPAL.Core/Brokers/Assemblies/AssemblyBroker.Files.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// ----------------------------------------------------------------------------------
// Copyright (c) The Standard Organization: A coalition of the Good-Hearted Engineers
// ----------------------------------------------------------------------------------

using System.IO;
using System.Reflection;

namespace STX.SPAL.Core.Brokers.Assemblies
{
internal partial class AssemblyBroker
{
public string[] GetApplicationAssemblies()
{
string applicationPath = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);

return Directory.GetFiles(applicationPath, "*.dll");
}
}
}
10 changes: 10 additions & 0 deletions STX.SPAL.Core/Brokers/Assemblies/AssemblyBroker.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// ----------------------------------------------------------------------------------
// Copyright (c) The Standard Organization: A coalition of the Good-Hearted Engineers
// ----------------------------------------------------------------------------------

namespace STX.SPAL.Core.Brokers.Assemblies
{
internal partial class AssemblyBroker : IAssemblyBroker
{
}
}
13 changes: 13 additions & 0 deletions STX.SPAL.Core/Brokers/Assemblies/IAssemblyBroker.Assemblies.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// ----------------------------------------------------------------------------------
// Copyright (c) The Standard Organization: A coalition of the Good-Hearted Engineers
// ----------------------------------------------------------------------------------

using System.Reflection;

namespace STX.SPAL.Core.Brokers.Assemblies
{
internal partial interface IAssemblyBroker
{
Assembly GetAssembly(string fullPath);
}
}
11 changes: 11 additions & 0 deletions STX.SPAL.Core/Brokers/Assemblies/IAssemblyBroker.Files.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// ----------------------------------------------------------------------------------
// Copyright (c) The Standard Organization: A coalition of the Good-Hearted Engineers
// ----------------------------------------------------------------------------------

namespace STX.SPAL.Core.Brokers.Assemblies
{
internal partial interface IAssemblyBroker
{
string[] GetApplicationAssemblies();
}
}
10 changes: 10 additions & 0 deletions STX.SPAL.Core/Brokers/Assemblies/IAssemblyBroker.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// ----------------------------------------------------------------------------------
// Copyright (c) The Standard Organization: A coalition of the Good-Hearted Engineers
// ----------------------------------------------------------------------------------

namespace STX.SPAL.Core.Brokers.Assemblies
{
internal partial interface IAssemblyBroker
{
}
}

0 comments on commit aa4aac2

Please sign in to comment.