using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Uestc.Auto6.Dso.Core { public interface IBroadcaster { event EventHandler? PublisherChanged; static event EventHandler? StaticPublisherChanged; virtual void OnRaiseCustomEvent(CustomEventArg e) { } static void OnRaiseStaticCustomEvent(CustomEventArg e) { EventHandler? handler = StaticPublisherChanged; if (handler != null) { handler(e,e); } } } public class CustomEventArg : EventArgs { public CustomEventArg(String s) { Message = s; } private string message = ""; public String Message { get { return message; } set { message = value; } } } }