protected override void OnProcessDelta(Delta d) { base.OnProcessDelta(d); if (d.HasFlag(Delta.Stats)) { StatsChanged.Raise(this); } if (d.HasFlag(Delta.Skills)) { SkillsChanged.Raise(this); } }
public async Task <IActionResult> Post([FromBody] DtoSkill dto) { var result = Mapper.Map <Skill>(dto); _context.Skills.Add(result); await _context.SaveChangesAsync(); dto.Id = result.Id; var @event = new SkillsChanged { Created = new List <DtoSkill> { dto } }; _eventBus.Publish(@event); return(Ok(result.Id)); }
void InvokeOnSkillsChanged() { SkillsChanged.SafeInvoke(this, new SkillsChangedEventArgs(TakeChangedSkills())); }