예제 #1
0
        public SemaphoreSlim QueueAction(MainThreadActionInvocation invocation)
        {
            SemaphoreSlim semaphoreReset = new SemaphoreSlim(0, 1);

            _Actions.Enqueue(new MainThreadAction(semaphoreReset, invocation));

            return(semaphoreReset);
        }
예제 #2
0
 public MainThreadAction(SemaphoreSlim semaphoreReset, MainThreadActionInvocation invocation)
 {
     _SemaphoreReset = semaphoreReset;
     _Invocation     = invocation ?? throw new NullReferenceException(nameof(invocation));
 }