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
1ea86041
Commit
1ea86041
authored
Jul 16, 2024
by
hasan khaddour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor.
parent
1551faff
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
60 additions
and
40 deletions
+60
-40
ICommand.cs
PSManagement.Application/Abstraction/Messaging/ICommand.cs
+0
-8
ICommandHandler.cs
...ment.Application/Abstraction/Messaging/ICommandHandler.cs
+0
-9
IQuery.cs
PSManagement.Application/Abstraction/Messaging/IQuery.cs
+0
-8
IQueryHandler.cs
...gement.Application/Abstraction/Messaging/IQueryHandler.cs
+0
-9
ValidationBehavior.cs
...cation/Behaviors/ValidationBehavior/ValidationBehavior.cs
+0
-1
ValidationException.cs
...ment.Application/Common/Exceptions/ValidationException.cs
+0
-0
AuthenticationResult.cs
...lication/Contracts/Authentication/AuthenticationResult.cs
+1
-1
IAuthenticationService.cs
...cation/Contracts/Authentication/IAuthenticationService.cs
+4
-3
IUsersRepository.cs
....Application/Contracts/Authentication/IUsersRepository.cs
+14
-0
User.cs
PSManagement.Application/Contracts/Authentication/User.cs
+15
-0
IJwtTokenGenerator.cs
...Application/Contracts/Authorization/IJwtTokenGenerator.cs
+9
-0
IEmailService.cs
PSManagement.Application/Contracts/Email/IEmailService.cs
+14
-0
PSManagement.Application.csproj
PSManagement.Application/PSManagement.Application.csproj
+2
-0
AuthenticationResponse.cs
...gement.Contracts/Authentication/AuthenticationResponse.cs
+1
-1
No files found.
PSManagement.Application/Abstraction/Messaging/ICommand.cs
deleted
100644 → 0
View file @
1551faff
using
MediatR
;
namespace
PSManagement.Application.Abstraction.Messaging
{
public
interface
ICommand
<
out
TResponse
>
:
IRequest
<
TResponse
>
{
}
}
PSManagement.Application/Abstraction/Messaging/ICommandHandler.cs
deleted
100644 → 0
View file @
1551faff
using
MediatR
;
namespace
PSManagement.Application.Abstraction.Messaging
{
public
interface
ICommandHandler
<
in
TCommand
,
TResponse
>
:
IRequestHandler
<
TCommand
,
TResponse
>
where
TCommand
:
ICommand
<
TResponse
>
{
}
}
PSManagement.Application/Abstraction/Messaging/IQuery.cs
deleted
100644 → 0
View file @
1551faff
using
MediatR
;
namespace
PSManagement.Application.Abstraction.Messaging
{
public
interface
IQuery
<
out
TResponse
>
:
IRequest
<
TResponse
>
{
}
}
PSManagement.Application/Abstraction/Messaging/IQueryHandler.cs
deleted
100644 → 0
View file @
1551faff
using
MediatR
;
namespace
PSManagement.Application.Abstraction.Messaging
{
public
interface
IQueryHandler
<
in
TQuery
,
TResponse
>
:
IRequestHandler
<
TQuery
,
TResponse
>
where
TQuery
:
IQuery
<
TResponse
>
{
}
}
PSManagement.Application/Behaviors/ValidationBehavior/ValidationBehavior.cs
View file @
1ea86041
using
MediatR
;
using
MediatR
;
using
PSManagement.Application.Abstraction.Messaging
;
using
PSManagement.Application.Common.Exceptions
;
using
PSManagement.Application.Common.Exceptions
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
...
...
PSManagement.Application/Common/Exceptions/Valid
tait
onException.cs
→
PSManagement.Application/Common/Exceptions/Valid
ati
onException.cs
View file @
1ea86041
File moved
PSManagement.Application/Contracts/Authentication/AuthenticationResult.cs
View file @
1ea86041
...
@@ -8,7 +8,7 @@ namespace PSManagement.Application.Contracts.Authentication
...
@@ -8,7 +8,7 @@ namespace PSManagement.Application.Contracts.Authentication
{
{
public
class
AuthenticationResult
public
class
AuthenticationResult
{
{
public
Guid
Id
{
get
;
set
;
}
public
int
Id
{
get
;
set
;
}
public
String
Email
{
get
;
set
;
}
public
String
Email
{
get
;
set
;
}
public
String
LastName
{
get
;
set
;
}
public
String
LastName
{
get
;
set
;
}
public
String
FirstName
{
get
;
set
;
}
public
String
FirstName
{
get
;
set
;
}
...
...
PSManagement.Application/Contracts/Authentication/IAuthenticationService.cs
View file @
1ea86041
using
System
;
using
PSManagement.SharedKernel.Utilities
;
using
System
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
namespace
PSManagement.Application.Contracts.Authentication
namespace
PSManagement.Application.Contracts.Authentication
{
{
public
interface
IAuthenticationService
public
interface
IAuthenticationService
{
{
public
Task
<
AuthenticationResult
>
Login
(
String
email
,
String
password
);
public
Task
<
Result
<
AuthenticationResult
>
>
Login
(
String
email
,
String
password
);
public
Task
<
AuthenticationResult
>
Register
(
String
email
,
String
firstName
,
String
lastName
,
String
password
);
public
Task
<
Result
<
AuthenticationResult
>
>
Register
(
String
email
,
String
firstName
,
String
lastName
,
String
password
);
}
}
...
...
PSManagement.Application/Contracts/Authentication/IUsersRepository.cs
0 → 100644
View file @
1ea86041
using
PSManagement.SharedKernel.Repositories
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
PSManagement.Application.Contracts.Authentication
{
public
interface
IUsersRepository
:
IRepository
<
User
>
{
public
Task
<
User
>
GetByEmail
(
String
email
);
}
}
PSManagement.Application/Contracts/Authentication/User.cs
0 → 100644
View file @
1ea86041
using
PSManagement.SharedKernel.Entities
;
using
System
;
namespace
PSManagement.Application.Contracts.Authentication
{
public
class
User
:
BaseEntity
{
public
String
Email
{
get
;
set
;
}
public
String
LastName
{
get
;
set
;
}
public
String
FirstName
{
get
;
set
;
}
public
String
Password
{
get
;
set
;
}
public
String
Token
{
get
;
set
;
}
}
}
\ No newline at end of file
PSManagement.Application/Contracts/Auth
entic
ation/IJwtTokenGenerator.cs
→
PSManagement.Application/Contracts/Auth
oriz
ation/IJwtTokenGenerator.cs
View file @
1ea86041
using
System
;
using
System
;
namespace
PSManagement.Application.Contracts.Auth
entic
ation
namespace
PSManagement.Application.Contracts.Auth
oriz
ation
{
{
public
interface
IJwtTokenGenerator
public
interface
IJwtTokenGenerator
{
{
public
String
GenerateToken
(
Guid
id
,
String
firstName
,
String
lastName
,
String
email
);
public
String
GenerateToken
(
int
id
,
String
firstName
,
String
lastName
,
String
email
);
}
}
}
}
PSManagement.Application/Contracts/Email/IEmailService.cs
0 → 100644
View file @
1ea86041
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
PSManagement.Application.Contracts.Email
{
public
interface
IEmailService
{
Task
SendAsync
(
String
recipient
,
String
subject
,
String
body
);
}
}
PSManagement.Application/PSManagement.Application.csproj
View file @
1ea86041
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
<Folder Include="Abstraction\" />
<Folder Include="Behaviors\AuthorizationBehavior\" />
<Folder Include="Services\" />
<Folder Include="Services\" />
<Folder Include="UseCases\" />
<Folder Include="UseCases\" />
</ItemGroup>
</ItemGroup>
...
...
PSManagement.Contracts/Authentication/AuthenticationResponse.cs
View file @
1ea86041
...
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
...
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace
PSManagement.Contracts.Authentication
namespace
PSManagement.Contracts.Authentication
{
{
public
record
AuthenticationResponse
(
public
record
AuthenticationResponse
(
Guid
Id
,
int
Id
,
String
FirstName
,
String
FirstName
,
String
LastName
,
String
LastName
,
String
Email
,
String
Email
,
...
...
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