Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
ProjectsStatusManagement
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hasan.bahjat
ProjectsStatusManagement
Commits
28a0eccc
Commit
28a0eccc
authored
Jul 13, 2024
by
hasan khaddour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Share Kernel Elements.
parent
5904697d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
0 deletions
+46
-0
BaseDomainEvent.cs
PSManagement.SharedKernel/DomainEvents/BaseDomainEvent.cs
+1
-0
BasdRequestException.cs
...ment.SharedKernel/DomainException/BasdRequestException.cs
+16
-0
DomainException.cs
...ment.SharedKernel/DomainException/Base/DomainException.cs
+0
-0
NotFoundException.cs
...agement.SharedKernel/DomainException/NotFoundException.cs
+17
-0
BaseEntity.cs
PSManagement.SharedKernel/Entities/BaseEntity.cs
+12
-0
No files found.
PSManagement.SharedKernel/DomainEvents/BaseDomainEvent.cs
View file @
28a0eccc
...
...
@@ -6,5 +6,6 @@ namespace PSManagement.SharedKernel.Events
public
abstract
class
BaseDomainEvent
:
INotification
{
public
DateTime
DateOccurred
{
get
;
protected
set
;
}
=
DateTime
.
UtcNow
;
}
}
PSManagement.SharedKernel/DomainException/BasdRequestException.cs
0 → 100644
View file @
28a0eccc
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
PSManagement.SharedKernel.DomainException
{
public
abstract
class
BadRequestException
:
DomainException
{
protected
BadRequestException
(
string
message
)
:
base
(
message
)
{
}
}
}
PSManagement.SharedKernel/DomainException/DomainException.cs
→
PSManagement.SharedKernel/DomainException/
Base/
DomainException.cs
View file @
28a0eccc
File moved
PSManagement.SharedKernel/DomainException/NotFoundException.cs
0 → 100644
View file @
28a0eccc
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
PSManagement.SharedKernel.DomainException
{
public
abstract
class
NotFoundException
:
DomainException
{
protected
NotFoundException
(
string
message
)
:
base
(
message
)
{
}
}
}
PSManagement.SharedKernel/Entities/BaseEntity.cs
View file @
28a0eccc
...
...
@@ -8,6 +8,18 @@ namespace PSManagement.SharedKernel.Entities
public
int
Id
{
get
;
set
;
}
public
List
<
BaseDomainEvent
>
Events
=
new
List
<
BaseDomainEvent
>();
public
void
AddDomainEvent
(
BaseDomainEvent
eventItem
)
{
Events
=
Events
??
new
List
<
BaseDomainEvent
>();
Events
.
Add
(
eventItem
);
}
public
void
RemoveDomainEvent
(
BaseDomainEvent
eventItem
)
{
Events
?.
Remove
(
eventItem
);
}
public
static
bool
operator
==(
BaseEntity
first
,
BaseEntity
second
)
{
if
(
first
is
null
&&
second
is
null
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment