internal static Note Initialize(Guid spaceId, Guid userId, string title, string content, NoteStatus status, Guid?cloneFromId = null) { var note = new Note(Guid.NewGuid()); note.ApplyChange(new NoteCreatedEvent(note.Id, note.GetNextVersion(), spaceId, userId, title, content, status, status == NoteStatus.Draft ? Visibility.Private : Visibility.Public, cloneFromId)); return(note); }