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