public async Task HandleAsync(UserDeleted @event) { if (@event == null) { throw new ArgumentNullException(nameof(@event), $"Event '{typeof(UserDeleted)}' can not be null."); } await _eventEntryService.CreateAsync(Guid.NewGuid(), @event.Id, "user", "delete"); }
public async Task HandleAsync(PasswordChanged @event) { if (@event == null) { throw new ArgumentNullException(nameof(@event), $"Event '{typeof(PasswordChanged)}' can not be null."); } await _eventEntryService.CreateAsync(Guid.NewGuid(), @event.UserId, "account", "change_password"); }
public async Task HandleAsync(CategoryCreated @event) { if (@event == null) { throw new ArgumentNullException(nameof(@event), $"Event '{typeof(CategoryCreated)}' can not be null."); } await _eventEntryService.CreateAsync(Guid.NewGuid(), @event.Category.Id, "category", "create", $"Name: '{@event.Category.Name}'"); }
public async Task HandleAsync(PostUpdated @event) { if (@event == null) { throw new ArgumentNullException(nameof(@event), $"Event '{typeof(PostCreated)}' can not be null."); } await _eventEntryService.CreateAsync(Guid.NewGuid(), @event.Post.Id, "post", "update", $"Title: {@event.Post.Title}"); }
public async Task HandleAsync(UserCreated @event) { if (@event == null) { throw new ArgumentNullException(nameof(@event), $"Event: '{typeof(UserCreated)}' can not be null."); } await _eventEntryService.CreateAsync(Guid.NewGuid(), @event.User.Id, "user", "create", $"Username: '******' Email: '{@event.User.Email}'"); }