public SemaphoreSlim QueueAction(MainThreadActionInvocation invocation) { SemaphoreSlim semaphoreReset = new SemaphoreSlim(0, 1); _Actions.Enqueue(new MainThreadAction(semaphoreReset, invocation)); return(semaphoreReset); }
public MainThreadAction(SemaphoreSlim semaphoreReset, MainThreadActionInvocation invocation) { _SemaphoreReset = semaphoreReset; _Invocation = invocation ?? throw new NullReferenceException(nameof(invocation)); }