├── README.md
├── DomainNotification.Prompt
├── App.config
├── Dto
│ └── PersonDto.cs
├── Properties
│ └── AssemblyInfo.cs
├── Program.cs
└── DomainNotification.Prompt.csproj
├── DomainNotification.Domain
├── Interfaces
│ ├── Errors
│ │ └── ILevel.cs
│ └── Notifications
│ │ ├── IDescription.cs
│ │ └── INotification.cs
├── Commands
│ ├── Command.cs
│ └── SavePerson.cs
├── ValueObjects
│ ├── Email.cs
│ └── ValueObject.cs
├── Errors
│ ├── Warning.cs
│ ├── Critical.cs
│ ├── ErrorDescription.cs
│ ├── Information.cs
│ ├── Error.cs
│ └── ErrorLevel.cs
├── Notifications
│ ├── Description.cs
│ └── Notification.cs
├── Entities
│ ├── Person.cs
│ └── Entity.cs
├── Properties
│ └── AssemblyInfo.cs
└── DomainNotification.Domain.csproj
├── DomainNotification.Application
├── Services
│ ├── PersonService.cs
│ └── Service.cs
├── Properties
│ └── AssemblyInfo.cs
└── DomainNotification.Application.csproj
├── DomainNotification.sln
└── .gitignore
/README.md:
--------------------------------------------------------------------------------
1 | # DomainNotification
2 | Usando o padrão Notification com C#
3 |
--------------------------------------------------------------------------------
/DomainNotification.Prompt/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/DomainNotification.Domain/Interfaces/Errors/ILevel.cs:
--------------------------------------------------------------------------------
1 | namespace DomainNotification.Domain.Interfaces.Errors
2 | {
3 | public interface ILevel
4 | {
5 | string Description { get; }
6 |
7 | string ToString();
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/DomainNotification.Domain/Interfaces/Notifications/IDescription.cs:
--------------------------------------------------------------------------------
1 | namespace DomainNotification.Domain.Interfaces.Notifications
2 | {
3 | public interface IDescription
4 | {
5 | string Message { get; }
6 |
7 | string ToString();
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/DomainNotification.Domain/Commands/Command.cs:
--------------------------------------------------------------------------------
1 | using DomainNotification.Domain.Entities;
2 | using DomainNotification.Domain.Errors;
3 |
4 | namespace DomainNotification.Domain.Commands
5 | {
6 | public abstract class Command
7 | {
8 | protected Command(Entity entity)
9 | {
10 | Entity = entity;
11 | }
12 |
13 | protected Entity Entity;
14 | protected Error Errors => Entity.Errors;
15 | }
16 | }
--------------------------------------------------------------------------------
/DomainNotification.Domain/Interfaces/Notifications/INotification.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using DomainNotification.Domain.Notifications;
3 |
4 | namespace DomainNotification.Domain.Interfaces.Notifications
5 | {
6 | public interface INotification
7 | {
8 | IList