File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
ManagedCode.Communication.Extensions
ManagedCode.Communication.Tests/Common/TestApp Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 33using Microsoft . AspNetCore . Mvc ;
44using Microsoft . AspNetCore . Mvc . Filters ;
55using Microsoft . Extensions . Logging ;
6+ using Microsoft . Extensions . Logging . Abstractions ;
67using static ManagedCode . Communication . Extensions . Helpers . HttpStatusCodeHelper ;
78using static ManagedCode . Communication . Extensions . Constants . ProblemConstants ;
89
910namespace ManagedCode . Communication . Extensions ;
1011
11- public abstract class ExceptionFilterBase ( ILogger logger ) : IExceptionFilter
12+ public abstract class ExceptionFilterBase : IExceptionFilter
1213{
13- protected readonly ILogger Logger = logger ?? throw new ArgumentNullException ( nameof ( logger ) ) ;
14+ protected readonly ILogger Logger = NullLogger < ExceptionFilterBase > . Instance ;
1415
1516 public virtual void OnException ( ExceptionContext context )
1617 {
Original file line number Diff line number Diff line change 22using System . Threading . Tasks ;
33using Microsoft . AspNetCore . SignalR ;
44using Microsoft . Extensions . Logging ;
5+ using Microsoft . Extensions . Logging . Abstractions ;
56using static ManagedCode . Communication . Extensions . Helpers . HttpStatusCodeHelper ;
67using static ManagedCode . Communication . Extensions . Constants . ProblemConstants ;
78
89namespace ManagedCode . Communication . Extensions ;
910
10- public abstract class HubExceptionFilterBase ( ILogger logger ) : IHubFilter
11+ public abstract class HubExceptionFilterBase : IHubFilter
1112{
12- protected readonly ILogger Logger = logger ?? throw new ArgumentNullException ( nameof ( logger ) ) ;
13+ protected readonly ILogger Logger = NullLogger . Instance ;
1314
1415 public async ValueTask < object ? > InvokeMethodAsync ( HubInvocationContext invocationContext ,
1516 Func < HubInvocationContext , ValueTask < object ? > > next )
Original file line number Diff line number Diff line change 11using ManagedCode . Communication . Extensions ;
2- using Microsoft . Extensions . Logging ;
32
43namespace ManagedCode . Communication . Tests . Common . TestApp ;
54
6- public class TestExceptionFilter ( ILogger < TestExceptionFilter > logger ) : ExceptionFilterBase ( logger ) ;
5+ public class TestExceptionFilter : ExceptionFilterBase ;
Original file line number Diff line number Diff line change 11using ManagedCode . Communication . Extensions ;
2- using Microsoft . Extensions . Logging ;
32
43namespace ManagedCode . Communication . Tests . Common . TestApp ;
54
6- public class TestHubExceptionFilter ( ILogger < TestHubExceptionFilter > logger ) : HubExceptionFilterBase ( logger ) ;
5+ public class TestHubExceptionFilter : HubExceptionFilterBase ;
You can’t perform that action at this time.
0 commit comments