mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-03-25 02:13:27 -04:00
Make fields readonly Remove unnecessary casts Format document Remove unnecessary usings Sort usings Use file-level namespaces Order modifiers
27 lines
939 B
C#
27 lines
939 B
C#
namespace CrossPlatformClientExe;
|
|
|
|
public abstract class OSConfigBase
|
|
{
|
|
public abstract Type InteropFunctionsType { get; }
|
|
public virtual Type[] ReferencedTypes { get; } = new Type[0];
|
|
|
|
public void Run()
|
|
{
|
|
//Each of these types belongs to a different windows-only assembly that's needed by
|
|
//the WinInterop methods. By referencing these types in main we force the runtime to
|
|
//load their assemblies before execution reaches inside main. This allows the calling
|
|
//process to find these assemblies in its module list.
|
|
_ = ReferencedTypes;
|
|
_ = InteropFunctionsType;
|
|
|
|
//Wait for the calling process to be ready to read the WriteLine()
|
|
Console.ReadLine();
|
|
|
|
// Signal the calling process that execution has reached inside main, and that all referenced assemblies have been loaded.
|
|
Console.WriteLine();
|
|
|
|
// Wait for the calling process to finish reading the process module list, then exit.
|
|
Console.ReadLine();
|
|
}
|
|
}
|