In one commit. Yes, you're seeing it right. Yes, I don't know what I was thinking.
15 lines
231 B
C#
15 lines
231 B
C#
using System;
|
|
|
|
namespace Server.Utils;
|
|
|
|
public class ActionDisposable : IDisposable {
|
|
public Action Action { get; init; }
|
|
|
|
public ActionDisposable(Action action) {
|
|
Action = action;
|
|
}
|
|
|
|
public void Dispose() {
|
|
Action();
|
|
}
|
|
}
|