mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
Add ToArray() to ConcurrentObservableCollection (#1256)
* Add ToArray() to ConcurrentObservableCollection * ---
This commit is contained in:
@@ -26,7 +26,6 @@ public partial class WireMockServer
|
||||
[PublicAPI]
|
||||
public IReadOnlyList<ILogEntry> LogEntries => _options.LogEntries.ToArray();
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
[PublicAPI]
|
||||
public IReadOnlyList<ILogEntry> FindLogEntries(params IRequestMatcher[] matchers)
|
||||
|
||||
@@ -84,4 +84,12 @@ internal class ConcurrentObservableCollection<T> : ObservableCollection<T>
|
||||
return Items.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
public T[] ToArray()
|
||||
{
|
||||
lock (_lockObject)
|
||||
{
|
||||
return Items.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user