//#define UseThreadContext using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Caching; using System.Runtime.Remoting.Messaging; using System.Text; using System.Threading; using System.Threading.Tasks; namespace Co…