mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-13 10:08:31 +00:00
27 lines
405 B
C#
27 lines
405 B
C#
using System;
|
|
|
|
namespace RGB.NET.Core;
|
|
|
|
public sealed class ActionDisposable : IDisposable
|
|
{
|
|
#region Properties & Fields
|
|
|
|
private readonly Action _onDispose;
|
|
|
|
#endregion
|
|
|
|
#region Constructors
|
|
|
|
public ActionDisposable(Action onDispose)
|
|
{
|
|
this._onDispose = onDispose;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Methods
|
|
|
|
public void Dispose() => _onDispose();
|
|
|
|
#endregion
|
|
} |