I have a circumstance where I have enqueued a number of Action objects and I have a threadpool working through each Action. However, if the application shuts down before the queue is empty, I would like to log what is remaining in the queue before closing.
Is it possible to get the method body from an Action object? I can see the MethodBody object from Action.Method.GetMethodBody(), but I don't see a way to get this out as a string.
Any thoughts, or am I crazy?
EDIT: One more thing; I would like to retain state information as well. That is, I would like to also retain the values of any variables used within the Action.