From 9353755d0ee0f2764dcf6e5574758ee57ff73cd6 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 10 Aug 2025 16:55:11 -0500 Subject: use readonlylist in a few places --- src/slskd/Events/EventService.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/slskd/Events/EventService.cs') 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 /// The retrieved list. /// Thrown when the specified is less than zero. /// Thrown when the specified is zero. - public virtual IReadOnlyCollection Get(int offset = 0, int limit = int.MaxValue) + public virtual IReadOnlyList 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; } -- cgit v1.2.3