示例#1
0
 static EmbeddedAssemblyResolver()
 {
     if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
     {
         _osPrefix = "win";
         _loader   = Activator.CreateInstance <NativeLoaderWin>();
     }
     else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
     {
         _osPrefix = "linux";
         _loader   = Activator.CreateInstance <NativeLoaderLinux>();
     }
     else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
     {
         _osPrefix = "osx";
         _loader   = Activator.CreateInstance <NativeLoaderOsx>();
     }
     _arch = RuntimeInformation.OSArchitecture.ToString().ToLowerInvariant();
 }
示例#2
0
 public NativeHandleBasedNativeObjectProxyFactory(INativeLoader nativeLoader) : base("ProxyAssembly")
 {
     _nativeLoader = nativeLoader;
 }
 public NativeHandleBasedNativeObjectProxyFactory(IGameModeClient gameModeClient, INativeLoader nativeLoader) : base(gameModeClient, "ProxyAssembly")
 {
     _nativeLoader = nativeLoader;
 }