File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,14 @@ public IActionResult Set([FromBody] ProxyInfo proxyInfo)
2929
3030 if ( proxyInfo . Recording . HasValue )
3131 {
32- _proxyState . IsRecording = proxyInfo . Recording . Value ;
32+ if ( proxyInfo . Recording . Value )
33+ {
34+ _proxyState . StartRecording ( ) ;
35+ }
36+ else
37+ {
38+ _proxyState . StopRecording ( ) ;
39+ }
3340 }
3441
3542 return Ok ( ProxyInfo . From ( _proxyState ) ) ;
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ namespace Microsoft.DevProxy;
88public interface IProxyState
99{
1010 Dictionary < string , object > GlobalData { get ; }
11- bool IsRecording { get ; set ; }
11+ bool IsRecording { get ; }
1212 IProxyConfiguration ProxyConfiguration { get ; }
1313 List < RequestLog > RequestLogs { get ; }
1414 void RaiseMockRequest ( ) ;
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ namespace Microsoft.DevProxy;
88
99public class ProxyState : IProxyState
1010{
11- public bool IsRecording { get ; set ; } = false ;
11+ public bool IsRecording { get ; private set ; } = false ;
1212 public List < RequestLog > RequestLogs { get ; } = [ ] ;
1313 public Dictionary < string , object > GlobalData { get ; } = new ( ) {
1414 { ProxyUtils . ReportsKey , new Dictionary < string , object > ( ) }
You can’t perform that action at this time.
0 commit comments