aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Events/EventService.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2025-08-10 16:55:11 -0500
committerJP Dillingham <jp@dillingham.me>2025-08-10 16:55:11 -0500
commit9353755d0ee0f2764dcf6e5574758ee57ff73cd6 (patch)
tree66a1f8dd25cf23e3ab2b712c348f8657f1f9e37e /src/slskd/Events/EventService.cs
parentb6e7db55157e106deba5ba21271e86ce44d74312 (diff)
downloadslskd-9353755d0ee0f2764dcf6e5574758ee57ff73cd6.tar.gz
use readonlylist in a few places
Diffstat (limited to 'src/slskd/Events/EventService.cs')
-rw-r--r--src/slskd/Events/EventService.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/slskd/Events/EventService.cs b/src/slskd/Events/EventService.cs
index d6f1a3f5..6dc61c13 100644
--- a/src/slskd/Events/EventService.cs
+++ b/src/slskd/Events/EventService.cs
@@ -48,7 +48,7 @@ public class EventService
/// <returns>The retrieved list.</returns>
/// <exception cref="ArgumentOutOfRangeException">Thrown when the specified <paramref name="offset"/> is less than zero.</exception>
/// <exception cref="ArgumentOutOfRangeException">Thrown when the specified <paramref name="limit"/> is zero.</exception>
- public virtual IReadOnlyCollection<EventRecord> Get(int offset = 0, int limit = int.MaxValue)
+ public virtual IReadOnlyList<EventRecord> Get(int offset = 0, int limit = int.MaxValue)
{
if (offset < 0)
{
@@ -68,7 +68,8 @@ public class EventService
.OrderByDescending(e => e.Timestamp)
.Skip(offset)
.Take(limit)
- .ToList();
+ .ToList()
+ .AsReadOnly();
return events;
}