mirror of
https://github.com/gwdevhub/Daybreak.git
synced 2026-07-15 15:19:57 +00:00
15 lines
320 B
C#
15 lines
320 B
C#
using System.Core.Extensions;
|
|
|
|
namespace Daybreak.API.Models;
|
|
|
|
public sealed class CallbackRegistration(Guid uid, Action onDispose) : IDisposable
|
|
{
|
|
private readonly Guid uid = uid;
|
|
private readonly Action onDispose = onDispose.ThrowIfNull();
|
|
|
|
public void Dispose()
|
|
{
|
|
this.onDispose();
|
|
}
|
|
}
|