public bool?TryExpire()
 {
     if (ExpiryAction == null)
     {
         return(AccessorTimingTCS?.TrySetCanceled(TimingTCS));
     }
     if (ExpiryAction == TimerExpiryAction.TrySetCanceled)
     {
         return(AccessorTimingTCS?.TrySetCanceled(TimingTCS));
     }
     if (ExpiryAction == TimerExpiryAction.TrySetResult)
     {
         return(AccessorTimingTCS?.TrySetResult(TimingTCS, Result));
     }
     return(null);
 }
 public bool?TryExpire()
 {
     if (ExpiryAction == null)
     {
         return(AccessorTimingTCS?.TrySetCanceled(TimingTCS));
     }
     if (ExpiryAction == TimerExpiryAction.TrySetCanceled)
     {
         return(AccessorTimingTCS?.TrySetCanceled(TimingTCS));
     }
     if (ExpiryAction == TimerExpiryAction.TrySetResult)
     {
         return(AccessorTimingTCS?.TrySetResult(TimingTCS, Result));
     }
     throw new ArgumentException($"Unexpected value of type TimerExpiryAction?: {ExpiryAction}");
 }
 public bool?TrySetException(string msg) => AccessorTimingTCS?.TrySetException(TimingTCS, new Exception(msg));
 public bool?TrySetException(Exception ex) => AccessorTimingTCS?.TrySetException(TimingTCS, ex);
 public bool?TryCancel() => AccessorTimingTCS?.TrySetCanceled(TimingTCS);