diff options
| author | JP Dillingham <jp@dillingham.me> | 2024-09-02 18:41:51 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2024-09-02 18:41:51 -0500 |
| commit | 2805a4c368e9585162f6379bb862e0951790613e (patch) | |
| tree | 82955c9ebac885f99f34b52b147be5ccc94a5d46 /src/slskd/Events/EventService.cs | |
| parent | 51836f520fe400a33ad9daab932f13c2ed24467d (diff) | |
| download | slskd-2805a4c368e9585162f6379bb862e0951790613e.tar.gz | |
rename types back :shrug:
Diffstat (limited to 'src/slskd/Events/EventService.cs')
| -rw-r--r-- | src/slskd/Events/EventService.cs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/slskd/Events/EventService.cs b/src/slskd/Events/EventService.cs index 759dc8cf..188d5895 100644 --- a/src/slskd/Events/EventService.cs +++ b/src/slskd/Events/EventService.cs @@ -40,21 +40,24 @@ public class EventService private ILogger Log { get; } = Serilog.Log.ForContext<EventService>(); /// <summary> - /// Adds the specified event <paramref name="event"/>. + /// Adds the specified event <paramref name="eventRecord"/>. /// </summary> - /// <param name="event">The record to add.</param> + /// <remarks> + /// To ensure proper construction of the record, use <see cref="EventRecord.From"/>. + /// </remarks> + /// <param name="eventRecord">The record to add.</param> /// <exception cref="ArgumentNullException">Thrown when the specified record is null.</exception> - public virtual void Add(Event @event) + public virtual void Add(EventRecord eventRecord) { - if (@event is null) + if (eventRecord is null) { - throw new ArgumentNullException(nameof(@event)); + throw new ArgumentNullException(nameof(eventRecord)); } try { using var context = ContextFactory.CreateDbContext(); - context.Add(@event); + context.Add(eventRecord); context.SaveChanges(); } catch (Exception ex) |
