Transfer contextual information to a new thread in your application


By default context information is lost when you go to a new thread. The Apprenda API offers a way to snapshot your current context and send it across threads, an example of the code you need to use is written below:

Apprenda.SaaSGrid.ContextSnapshot ctx = Apprenda.SaaSGrid.ContextSnapshot.Acquire();

return Task.Factory.StartNew(() =>
using (var proxy = new IncidentRequestManagementServiceProxy())
return proxy.GetIncident(incidentId);

Have more questions? Submit a request