private bool HasExpiredTimer(Guid workflowInstanceId, out Guid timerId)
 {
     lock (locker)
     {
         CallbackInfo ci = pendingScheduleRequests.FindByPriority(DateTime.UtcNow,
                                                                  delegate(CallbackInfo c) { return(c.InstanceId == workflowInstanceId); });
         if (ci != null)
         {
             timerId = ci.TimerId;
             return(true);
         }
     }
     timerId = Guid.Empty;
     return(false);
 }