File tree Expand file tree Collapse file tree 6 files changed +26
-9
lines changed Expand file tree Collapse file tree 6 files changed +26
-9
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,9 @@ namespace DevProxy.ApiControllers;
1313
1414[ ApiController ]
1515[ Route ( "[controller]" ) ]
16- sealed class ProxyController ( IProxyStateController proxyStateController , IProxyConfiguration proxyConfiguration ) : ControllerBase
16+ #pragma warning disable CA1515 // required for the API controller
17+ public sealed class ProxyController ( IProxyStateController proxyStateController , IProxyConfiguration proxyConfiguration ) : ControllerBase
18+ #pragma warning restore CA1515
1719{
1820 private readonly IProxyStateController _proxyStateController = proxyStateController ;
1921 private readonly IProxyConfiguration _proxyConfiguration = proxyConfiguration ;
@@ -52,7 +54,9 @@ public async Task<IActionResult> SetAsync([FromBody] ProxyInfo proxyInfo)
5254 }
5355
5456 [ HttpPost ( "mockRequest" ) ]
57+ #pragma warning disable CA1030
5558 public async Task RaiseMockRequestAsync ( )
59+ #pragma warning restore CA1030
5660 {
5761 await _proxyStateController . MockRequestAsync ( ) ;
5862 Response . StatusCode = 202 ;
Original file line number Diff line number Diff line change 77
88namespace DevProxy . ApiControllers ;
99
10- sealed class ProxyInfo
10+ #pragma warning disable CA1515 // required for the API controller
11+ public sealed class ProxyInfo
12+ #pragma warning restore CA1515
1113{
1214 public bool ? Recording { get ; set ; }
1315 public string ? ConfigFile { get ; init ; }
1416
1517 public static ProxyInfo From ( IProxyState proxyState , IProxyConfiguration proxyConfiguration )
1618 {
19+ ArgumentNullException . ThrowIfNull ( proxyState ) ;
20+ ArgumentNullException . ThrowIfNull ( proxyConfiguration ) ;
21+
1722 return new ProxyInfo
1823 {
1924 ConfigFile = proxyConfiguration . ConfigFile ,
Original file line number Diff line number Diff line change 44
55namespace DevProxy . Jwt ;
66
7- sealed class JwtOptions
7+ #pragma warning disable CA1515 // required for the API controller
8+ public sealed class JwtOptions
9+ #pragma warning restore CA1515
810{
911 public IEnumerable < string > ? Audiences { get ; set ; }
10- public Dictionary < string , string > ? Claims { get ; set ; }
12+ public Dictionary < string , string > ? Claims { get ; init ; }
1113 public string ? Issuer { get ; set ; }
1214 public string ? Name { get ; set ; }
1315 public IEnumerable < string > ? Roles { get ; set ; }
Original file line number Diff line number Diff line change 33// See the LICENSE file in the project root for more information.
44
55using DevProxy . Abstractions . Proxy ;
6+ using System . Collections . ObjectModel ;
67
78namespace DevProxy . Proxy ;
89
9- interface IProxyState
10+ #pragma warning disable CA1515 // required for the API controller
11+ public interface IProxyState
12+ #pragma warning restore CA1515
1013{
11- Dictionary < string , object > GlobalData { get ; set ; }
14+ Dictionary < string , object > GlobalData { get ; }
1215 bool IsRecording { get ; set ; }
13- List < RequestLog > RequestLogs { get ; set ; }
16+ Collection < RequestLog > RequestLogs { get ; }
1417}
Original file line number Diff line number Diff line change 44
55namespace DevProxy . Proxy ;
66
7- interface IProxyStateController
7+ #pragma warning disable CA1515 // required for the API controller
8+ public interface IProxyStateController
9+ #pragma warning restore CA1515
810{
911 IProxyState ProxyState { get ; }
1012 void StartRecording ( ) ;
Original file line number Diff line number Diff line change 44
55using DevProxy . Abstractions . Proxy ;
66using DevProxy . Abstractions . Utils ;
7+ using System . Collections . ObjectModel ;
78
89namespace DevProxy . Proxy ;
910
1011sealed class ProxyState : IProxyState
1112{
1213 public bool IsRecording { get ; set ; }
13- public List < RequestLog > RequestLogs { get ; set ; } = [ ] ;
14+ public Collection < RequestLog > RequestLogs { get ; set ; } = [ ] ;
1415 public Dictionary < string , object > GlobalData { get ; set ; } = new ( ) {
1516 { ProxyUtils . ReportsKey , new Dictionary < string , object > ( ) }
1617 } ;
You can’t perform that action at this time.
0 commit comments