I know that when you run some method in parallel by calling BeginInvoke() or ThreadPool.QueueUserWorkItem(...) .NET framework is capturing ExecutionContext object that conta
I don't know how it relates to ExecutionContext
, but back in the day, we could create context-bound objects. See Context class. Ignore the fact that this particular class is for infrastructure - the article is a starting point to learn about contexts.
Found it:
CallContext.LogicalSetData(...)
(documentation)
and
CallContext.LogicalGetData(...)
(documentation)