private static void OnMyStaticEvent()
 {
     if (MyStaticEvent != null)
     {
         lock (MyStaticEvent)
         {
             MyStaticEvent?.Invoke(null, new EventArgs());
         }
     }
 }
 private static void OnMyStaticEvent()
 {
     MyStaticEvent?.Invoke(null, new EventArgs());
 }