using Nop.Core.Domain.Orders;
using Nop.Core.Domain.Shipping;
using Nop.Services.Events;
namespace Nop.Plugin.Misc.NopCliGeneric.Services
{
///
/// Represents event consumer
///
public class EventConsumer : IConsumer, IConsumer, IConsumer
{
#region Fields
private readonly INopCliGenericService _NopCliGenericService;
#endregion
#region Ctor
public EventConsumer(INopCliGenericService NopCliGenericService)
{
_NopCliGenericService = NopCliGenericService;
}
#endregion
#region Methods
///
/// Handle the Shipment Sent Event
///
/// The event message.
public void HandleEvent(ShipmentSentEvent eventMessage)
{
//handle event
_NopCliGenericService.SendNopCliGenericShip(eventMessage);
}
///
/// Handle the Order Placed Event
///
/// The event message.
public void HandleEvent(OrderPlacedEvent eventMessage)
{
//handle event
_NopCliGenericService.SendNopCliGenericPlaced(eventMessage);
}
///
/// Handle the Order Cancelled Event
///
/// The event message.
public void HandleEvent(OrderCancelledEvent eventMessage)
{
//handle event
_NopCliGenericService.SendNopCliGenericCancelled(eventMessage);
}
#endregion
}
}