mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-06 22:50:30 -04:00
Removed NioTSO client and server
- NioTSO client isn't needed because we're using RayLib - Added FreeSO's API server to handle most backend operations
This commit is contained in:
parent
f12ba1502b
commit
22191ce648
591 changed files with 53264 additions and 3362 deletions
32
server/tso.common/Utils/AssemblyUtils.cs
Executable file
32
server/tso.common/Utils/AssemblyUtils.cs
Executable file
|
@ -0,0 +1,32 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
namespace FSO.Common.Utils
|
||||
{
|
||||
public class AssemblyUtils
|
||||
{
|
||||
public static Assembly Entry;
|
||||
public static List<Assembly> GetFreeSOLibs()
|
||||
{
|
||||
var map = new Dictionary<string, Assembly>();
|
||||
if (Entry == null) Entry = Assembly.GetEntryAssembly();
|
||||
RecurseAssembly(Entry, map);
|
||||
return map.Values.ToList();
|
||||
}
|
||||
|
||||
private static void RecurseAssembly(Assembly assembly, Dictionary<string, Assembly> map)
|
||||
{
|
||||
var refs = assembly.GetReferencedAssemblies();
|
||||
foreach (var refAsm in refs)
|
||||
{
|
||||
if ((refAsm.Name.StartsWith("FSO.") || refAsm.Name.Equals("FreeSO") || refAsm.Name.Equals("server")) && !map.ContainsKey(refAsm.Name))
|
||||
{
|
||||
var loadedAssembly = Assembly.Load(refAsm);
|
||||
map.Add(refAsm.Name, loadedAssembly);
|
||||
RecurseAssembly(loadedAssembly, map);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue