Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (19 sloc) 645 Bytes
#if NETSTANDARD // ShipCreatedDomainEventHandler will only work in AspNetCoreMvcApp and not in LegacyWebFormsApp
using CoreDdd.Domain.Events;
using Rebus.Bus.Advanced;
namespace CoreDddShared.Domain.Events
{
public class ShipCreatedDomainEventHandler : IDomainEventHandler<ShipCreatedDomainEvent>
{
private readonly ISyncBus _bus;
public ShipCreatedDomainEventHandler(ISyncBus bus)
{
_bus = bus;
}
public void Handle(ShipCreatedDomainEvent domainEvent)
{
_bus.Publish(new ShipCreatedDomainEventMessage {ShipId = domainEvent.ShipId});
}
}
}
#endif
You can’t perform that action at this time.