public ActivityInfo ParallelDependentActivityIdentified()
{
var activity = CurrentThreadActivity;
if (activity == null)
throw new InvalidOperationException("Expected to join into an existing activity but there is not one");
lock (fieldsLock)
{
++activity.ThreadCount;
}
return activity;
}