//public void BaseActionCallBack(object sender, PubSubEventArgs eventArg) //{ // string _publisherName = sender.GetType().Name; // Console.WriteLine(String.Format("Publisher Name {0}, message {1}", _publisherName, eventArg.msg)); //} public void Action1CallBack(object sender, PubSubEventArgs arg) { // BaseActionCallBack(sender, "Action1 received from " + arg); string _pubblisherName = sender.GetType().Name; Console.WriteLine(String.Format("Publisher Name {0}, message {1}", _pubblisherName, arg)); Console.Write("Action1 handled by Event Subscriber" + this.GetType().Name); }
public void Action2CallBack(object sender, PubSubEventArgs arg) { string _pubblisherName = sender.GetType().Name; Console.WriteLine(String.Format("Publisher Name {0}, message {1}", _pubblisherName, arg)); Console.WriteLine("Action2 handled by event subscriber" + this.GetType().Name); }