File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public IDisposable Add(IJsonRpcHandler handler)
22
22
return _collection . Add ( handler ) ;
23
23
}
24
24
25
- private IHandlerDescriptor GetDescriptor ( IMethodWithParams instance )
25
+ private IHandlerDescriptor FindDescriptor ( IMethodWithParams instance )
26
26
{
27
27
return _collection . FirstOrDefault ( x => x . Method == instance . Method ) ;
28
28
}
@@ -91,12 +91,12 @@ protected virtual async Task<ErrorResponse> RouteRequest(IHandlerDescriptor hand
91
91
92
92
public IHandlerDescriptor GetDescriptor ( Notification notification )
93
93
{
94
- return GetDescriptor ( notification ) ;
94
+ return FindDescriptor ( notification ) ;
95
95
}
96
96
97
97
public IHandlerDescriptor GetDescriptor ( Request request )
98
98
{
99
- return GetDescriptor ( request ) ;
99
+ return FindDescriptor ( request ) ;
100
100
}
101
101
102
102
Task IRequestRouter . RouteNotification ( Notification notification )
Original file line number Diff line number Diff line change @@ -19,11 +19,11 @@ public async Task ExecutesHandler()
19
19
var exitHandler = Substitute . For < IExitHandler > ( ) ;
20
20
21
21
var collection = new HandlerCollection { exitHandler } ;
22
- var mediator = new RequestRouter ( collection ) ;
22
+ IRequestRouter mediator = new RequestRouter ( collection ) ;
23
23
24
24
var notification = new Notification ( "exit" , null ) ;
25
25
26
- await mediator . RouteNotification ( null , notification ) ;
26
+ await mediator . RouteNotification ( notification ) ;
27
27
28
28
await exitHandler . Received ( 1 ) . Handle ( ) ;
29
29
}
You can’t perform that action at this time.
0 commit comments