using Client.Domain.Entities; using Client.Domain.Events; using Client.Domain.Factories; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Client.Domain.Service { public class SkillHandler : EntityHandler { public override void OnCreate(Skill entity) { eventBus.Publish(new SkillCreatedEvent(entity)); } public override void OnDelete(Skill entity) { eventBus.Publish(new SkillDeletedEvent(entity.Id)); } public SkillHandler(EntityFactoryInterface factory, EntityFactoryInterface entityFactory, EventBusInterface eventBus) : base(factory, entityFactory) { this.eventBus = eventBus; } private readonly EventBusInterface eventBus; } }