public void CustomerCreated(CustomerCreatedNotification notification)
{
try
{
this.Bus.Publish(notification);
}
catch (Exception ex)
{
throw new FaultException(ex.Message);
}
}
public void CustomerDeleted(CustomerDeletedNotification notification)
{
try
{
this.Bus.Publish(notification);
}
catch (Exception ex)
{
throw new FaultException(ex.Message);
}
}
public void PowerSupplyContractCreated(PowerSupplyContractCreatedNotification notification)
{
try
{
this.Bus.SendLocal(notification);
}
catch (Exception ex)
{
throw new FaultException(ex.Message);
}
}
Fundamentally, Send is to send a command and Publish is to publish an event.
When you send a command with Send or SendLocal and there is no handler, it is considered as an error although the exception is only logged as informational. Publishing events with no matching handlers considered as normal.
--
You received this message because you are subscribed to the Google Groups "Particular Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to particularsoftw...@googlegroups.com.
To post to this group, send email to particula...@googlegroups.com.
Visit this group at http://groups.google.com/group/particularsoftware.
To view this discussion on the web visit https://groups.google.com/d/msgid/particularsoftware/c932c459-da1b-4711-9b37-edc1ecb68e05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.