public bool TrySetResult(EntryBlockUC result)
            {
                bool setResult = TCS.TrySetResult(result);

                if (StoredTimingProcessorTCS != null && setResult)
                {
                    TimerProcessorUC.TimerProcessor.UnRegisterAsync(TCS);
                }
                return(setResult);
            }
        public AsyncEntryBlockUC(EntryBlockUC entryBlockForTaskPredicate, Task taskPredicate, ConfigCompletionContinuation configContinuation = ConfigCompletionContinuation.ContinueOnDefaultContext)
        {
            EntryBlock  = null;
            TaskAwaiter = null;

            EntryBlockForTaskPredicate = entryBlockForTaskPredicate;
            TaskBoolPredicateAwaiter   = null;
            TaskPredicateAwaiter       = taskPredicate.ConfigureAwait(configContinuation.ContinueOnCapturedContext()).GetAwaiter();

            if (!TaskPredicateAwaiter.HasValue)
            {
                throw new ArgumentNullException(nameof(taskPredicate));
            }
        }
 public AsyncEntryBlockUC(EntryBlockUC entryBlock) : this(entryBlock, (TaskCompletionSource <EntryBlockUC>)null)
 {
 }
示例#4
0
 public AsyncEntryBlockUC(EntryBlockUC entryBlock) : this(entryBlock, null)
 {
 }
 public AsyncLockUC()
 {
     ExclusiveEntry = new EntryBlockUC(EntryTypeUC.Exclusive, new EntryCompletionUC(Exit));
 }