@@ -18,20 +18,14 @@ namespace Cite.Api.Infrastructure.EventHandlers
18
18
{
19
19
public class UserHandler
20
20
{
21
- protected readonly CiteContext _db ;
22
21
protected readonly IMapper _mapper ;
23
- protected readonly IUserService _UserService ;
24
22
protected readonly IHubContext < MainHub > _mainHub ;
25
23
26
24
public UserHandler (
27
- CiteContext db ,
28
25
IMapper mapper ,
29
- IUserService UserService ,
30
26
IHubContext < MainHub > mainHub )
31
27
{
32
- _db = db ;
33
28
_mapper = mapper ;
34
- _UserService = UserService ;
35
29
_mainHub = mainHub ;
36
30
}
37
31
@@ -67,10 +61,8 @@ protected async Task HandleCreateOrUpdate(
67
61
public class UserCreatedSignalRHandler : UserHandler , INotificationHandler < EntityCreated < UserEntity > >
68
62
{
69
63
public UserCreatedSignalRHandler (
70
- CiteContext db ,
71
64
IMapper mapper ,
72
- IUserService userService ,
73
- IHubContext < MainHub > mainHub ) : base ( db , mapper , userService , mainHub ) { }
65
+ IHubContext < MainHub > mainHub ) : base ( mapper , mainHub ) { }
74
66
75
67
public async Task Handle ( EntityCreated < UserEntity > notification , CancellationToken cancellationToken )
76
68
{
@@ -81,10 +73,8 @@ public async Task Handle(EntityCreated<UserEntity> notification, CancellationTok
81
73
public class UserUpdatedSignalRHandler : UserHandler , INotificationHandler < EntityUpdated < UserEntity > >
82
74
{
83
75
public UserUpdatedSignalRHandler (
84
- CiteContext db ,
85
76
IMapper mapper ,
86
- IUserService userService ,
87
- IHubContext < MainHub > mainHub ) : base ( db , mapper , userService , mainHub ) { }
77
+ IHubContext < MainHub > mainHub ) : base ( mapper , mainHub ) { }
88
78
89
79
public async Task Handle ( EntityUpdated < UserEntity > notification , CancellationToken cancellationToken )
90
80
{
@@ -99,10 +89,8 @@ await base.HandleCreateOrUpdate(
99
89
public class UserDeletedSignalRHandler : UserHandler , INotificationHandler < EntityDeleted < UserEntity > >
100
90
{
101
91
public UserDeletedSignalRHandler (
102
- CiteContext db ,
103
92
IMapper mapper ,
104
- IUserService userService ,
105
- IHubContext < MainHub > mainHub ) : base ( db , mapper , userService , mainHub )
93
+ IHubContext < MainHub > mainHub ) : base ( mapper , mainHub )
106
94
{
107
95
}
108
96
0 commit comments