Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DevProxy/Logging/RequestLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Except
{
if (_proxyState.IsRecording)
{
_proxyState.RequestLogs.Add(requestLog);
_proxyState.RequestLogs.Enqueue(requestLog);
}

var requestLogArgs = new RequestLogArgs(requestLog);
Expand Down
4 changes: 2 additions & 2 deletions DevProxy/Proxy/IProxyState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// See the LICENSE file in the project root for more information.

using DevProxy.Abstractions.Proxy;
using System.Collections.ObjectModel;
using System.Collections.Concurrent;

namespace DevProxy.Proxy;

Expand All @@ -13,5 +13,5 @@ public interface IProxyState
{
Dictionary<string, object> GlobalData { get; }
bool IsRecording { get; set; }
Collection<RequestLog> RequestLogs { get; }
ConcurrentQueue<RequestLog> RequestLogs { get; }
}
4 changes: 2 additions & 2 deletions DevProxy/Proxy/ProxyState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

using DevProxy.Abstractions.Proxy;
using DevProxy.Abstractions.Utils;
using System.Collections.ObjectModel;
using System.Collections.Concurrent;

namespace DevProxy.Proxy;

sealed class ProxyState : IProxyState
{
public bool IsRecording { get; set; }
public Collection<RequestLog> RequestLogs { get; set; } = [];
public ConcurrentQueue<RequestLog> RequestLogs { get; set; } = [];
public Dictionary<string, object> GlobalData { get; set; } = new() {
{ ProxyUtils.ReportsKey, new Dictionary<string, object>() }
};
Expand Down