diff options
| author | JP Dillingham <jp@dillingham.me> | 2025-08-16 15:06:25 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-16 15:06:25 -0500 |
| commit | b08c877124a29fbdc34ae5fea8839006e307810b (patch) | |
| tree | f058d1cdb7821aec539cf3c11f67812627108293 /src/slskd/Events | |
| parent | 52a7fa8141e5f11b95175f68dbd8fc3070636e3c (diff) | |
| parent | 5b0c4b7a42c22164635efa2558131075e725dcf4 (diff) | |
| download | slskd-b08c877124a29fbdc34ae5fea8839006e307810b.tar.gz | |
Merge branch 'master' into metrics
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; } |
