mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-31 22:23:05 +02:00
Fix LogEntries: collection was modified exception (#309)
* _options.LogEntries.ToArray() * . * update error message
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
using JetBrains.Annotations;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@@ -8,6 +5,9 @@ using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using JetBrains.Annotations;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using WireMock.Admin.Mappings;
|
||||
using WireMock.Admin.Scenarios;
|
||||
using WireMock.Admin.Settings;
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace WireMock.Server
|
||||
/// Gets the request logs.
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public IEnumerable<LogEntry> LogEntries => new ReadOnlyCollection<LogEntry>(_options.LogEntries);
|
||||
public IEnumerable<LogEntry> LogEntries => new ReadOnlyCollection<LogEntry>(_options.LogEntries.ToArray());
|
||||
|
||||
/// <summary>
|
||||
/// The search log-entries based on matchers.
|
||||
|
||||
Reference in New Issue
Block a user