Esempio n. 1
0
        public static void Bootstrap()
        {
            var bus = ObjectFactory.GetInstance <IServiceBus>();

            bus.Subscribe <OrderDetailRequestActor>();

            bus.Subscribe <RetrieveOrderDetails>(message =>
            {
                var details = new OrderDetailsReceivedImpl(message.CustomerId, message.OrderId, SystemUtil.Now, OrderStatus.Accepted);

                // TODO
                // impl builder

                // var message = BuildImpl<ODR>(x =>
                //	{ x.Set(y => y.CustomerId, customerId)
                //	}


                CurrentMessage.Respond(details);
            });


            PipelineViewer.Trace(bus.InboundPipeline);
        }
Esempio n. 2
0
		public static void Bootstrap()
		{
			var bus = ObjectFactory.GetInstance<IServiceBus>();

			bus.Subscribe<OrderDetailRequestActor>();

			bus.Subscribe<RetrieveOrderDetails>(message =>
				{
					var details = new OrderDetailsReceivedImpl(message.CustomerId, message.OrderId, SystemUtil.Now, OrderStatus.Accepted);

					// TODO
					// impl builder

					// var message = BuildImpl<ODR>(x =>
				//	{ x.Set(y => y.CustomerId, customerId)
				//	}


					CurrentMessage.Respond(details);
				});


			PipelineViewer.Trace(bus.InboundPipeline);
		}