public static void Publish(BuildEvent buildEvent)
 {
     if (_threadQueue != null)
     {
         _threadQueue.QueueObject(buildEvent);
     }
     else
     {
         BuildEventStream.OnNext(buildEvent);
     }
 }