public void PublishData(T data) { MessageArgument <T> message = (MessageArgument <T>)Activator.CreateInstance(typeof(MessageArgument <T>), new object[] { data }); OnDataPublisher(message); }
void publisher_DataPublisher2(object sender, MessageArgument <int> e) { Console.WriteLine("Subscriber 2 : " + e.Message); }
public void OnDataPublisher(MessageArgument <T> args) { DataPublisher?.Invoke(this, args); }