This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace EventSourcingTaskApp.Core | |
| { | |
| using EventSourcingTaskApp.Core.Framework; | |
| public class Task : Aggregate | |
| { | |
| public string Title { get; private set; } | |
| public BoardSections Section { get; private set; } | |
| public string AssignedTo { get; private set; } | |
| public bool IsCompleted { get; private set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace EventSourcingTaskApp.Core | |
| { | |
| public enum BoardSections | |
| { | |
| Open = 1, | |
| InProgress = 2, | |
| Done = 3 | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace EventSourcingTaskApp.Core.Exceptions | |
| { | |
| using System; | |
| public class TaskAlreadyCreatedException : Exception | |
| { | |
| public TaskAlreadyCreatedException() : base("Task already created.") { } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace EventSourcingTaskApp.Core.Exceptions | |
| { | |
| using System; | |
| public class TaskNotFoundException : Exception | |
| { | |
| public TaskNotFoundException() : base("Task not found.") { } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace EventSourcingTaskApp.Core.Exceptions | |
| { | |
| using System; | |
| public class TaskCompletedException : Exception | |
| { | |
| public TaskCompletedException() : base("Task is completed.") { } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace EventSourcingTaskApp.Core.Events | |
| { | |
| using System; | |
| public class CreatedTask | |
| { | |
| public Guid TaskId { get; set; } | |
| public string CreatedBy { get; set; } | |
| public string Title { get; set; } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace EventSourcingTaskApp.Core | |
| { | |
| using EventSourcingTaskApp.Core.Events; | |
| using EventSourcingTaskApp.Core.Exceptions; | |
| using EventSourcingTaskApp.Core.Framework; | |
| using System; | |
| public class Task : Aggregate | |
| { | |
| public string Title { get; private set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace EventSourcingTaskApp.Core.Events | |
| { | |
| using System; | |
| public class AssignedTask | |
| { | |
| public Guid TaskId { get; set; } | |
| public string AssignedBy { get; set; } | |
| public string AssignedTo { get; set; } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace EventSourcingTaskApp.Core | |
| { | |
| using EventSourcingTaskApp.Core.Events; | |
| using EventSourcingTaskApp.Core.Exceptions; | |
| using EventSourcingTaskApp.Core.Framework; | |
| using System; | |
| public class Task : Aggregate | |
| { | |
| public string Title { get; private set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace EventSourcingTaskApp.Core.Events | |
| { | |
| using System; | |
| public class MovedTask | |
| { | |
| public Guid TaskId { get; set; } | |
| public string MovedBy { get; set; } | |
| public BoardSections Section { get; set; } | |
| } |