mirror of
https://github.com/Stone-Red-Code/RemoteExec.git
synced 2026-09-04 09:06:20 +02:00
Initial commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using System.Reflection;
|
||||
|
||||
namespace RemoteExec.Server;
|
||||
|
||||
public class RequestAssemblyEventArgs(AssemblyName assemblyName) : EventArgs
|
||||
{
|
||||
private readonly TaskCompletionSource taskCompletionSource = new TaskCompletionSource();
|
||||
|
||||
private Assembly? assembly = null;
|
||||
|
||||
public AssemblyName Assembly { get; } = assemblyName;
|
||||
|
||||
public async Task<Assembly?> GetAssemblyAsync()
|
||||
{
|
||||
await taskCompletionSource.Task;
|
||||
return assembly;
|
||||
}
|
||||
|
||||
public void SetAssembly(Assembly assembly)
|
||||
{
|
||||
this.assembly = assembly;
|
||||
taskCompletionSource.SetResult();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user