Exemplo n.º 1
0
        static void Main(string[] args)
        {
            MessageBroker         bus = MessageBroker.Instance;
            CreateCustomerMessage cm  = new CreateCustomerMessage();

            cm.Custommessage = "This is my custom message";
            MessagePayload <CreateCustomerMessage> messagePayload = new MessagePayload <CreateCustomerMessage>(new CreateCustomerMessage(), new CustomerCreator());

            bus.Subscribe <CreateCustomerMessage>(i => new CreateCustomerhandler(messagePayload));
            bus.Publish <CreateCustomerMessage>(new CustomerCreator(), cm);
            Console.ReadLine();
        }
Exemplo n.º 2
0
 public void handle(MessagePayload <CreateCustomerMessage> messagePayload, string str)
 {
     Console.WriteLine("Handling Customer Creation");
 }
Exemplo n.º 3
0
 public CreateCustomerhandler(MessagePayload <CreateCustomerMessage> messagePayload)
 {
     Console.WriteLine("parameterized CTOR -- Handling Customer Creation");
 }