diff options
| author | JP Dillingham <jp@dillingham.me> | 2025-08-10 16:59:52 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-10 16:59:52 -0500 |
| commit | b09355d849e100f65e9d2c1fae118adf78a78d41 (patch) | |
| tree | 3b0b7f22db6a13c9c1376d17f25ac5aa5b7c86e0 /src/slskd/Events | |
| parent | 0aecb39d0965ec013f6a2293165a6944869c963a (diff) | |
| parent | 52cf12d65d55f6c7431c669991c7fd0cb130cc0f (diff) | |
| download | slskd-b09355d849e100f65e9d2c1fae118adf78a78d41.tar.gz | |
Merge branch 'master' into bump
Diffstat (limited to 'src/slskd/Events')
| -rw-r--r-- | src/slskd/Events/EventService.cs | 5 |
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; } |
