示例#1
0
 void publisher_DataPublisher3(object sender, MessageArgument <string> e)
 {
     Console.WriteLine("String Subscriber 1 : " + e.Message);
 }
示例#2
0
 void publisher_DataPublisher2(object sender, MessageArgument <int> e)
 {
     Console.WriteLine("Subscriber 2 : " + e.Message);
 }
示例#3
0
        public void PublishData(T data)
        {
            MessageArgument <T> message = (MessageArgument <T>)Activator.CreateInstance(typeof(MessageArgument <T>), new object[] { data });

            OnDataPublisher(message);
        }