public void OnNoteCreated(NoteCreatedEvent @event) { CreatedDate = @event.CreatedTime; Title = @event.Title; Description = @event.Desc; Category = @event.Cat; }
public Task <bool> Handle(CreateNoteCommand request, CancellationToken cancellationToken) { var noteCreatedEvent = new NoteCreatedEvent( request.Header, request.Content); bus.Publish(noteCreatedEvent); return(Task.FromResult(true)); }
private void When(NoteCreatedEvent @event) { _spaceId = @event.SpaceId; _creatorId = @event.CreatorId; _title = @event.Title; _content = @event.Content; _status = @event.Status; _visibility = @event.Visibility; _cloneFormId = @event.CloneFormId; _tags = new List <string>(); }
public void When(NoteCreatedEvent @event) { Id = @event.AggregateId; Content = @event.Content; Status = @event.Status; Title = @event.Title; Visibility = @event.Visibility; CreatorId = @event.CreatorId; CreationTime = @event.OccurrenceTime; SpaceId = @event.SpaceId; CloneFormId = @event.CloneFormId; Version = Status == NoteStatus.Draft ? 0 : 1; }