21 lines
424 B
C#
21 lines
424 B
C#
using System;
|
|
|
|
namespace SqlSugar.DistributedSystem.Snowflake
|
|
{
|
|
public class DisposableAction : IDisposable
|
|
{
|
|
readonly Action _action;
|
|
|
|
public DisposableAction(Action action)
|
|
{
|
|
if (action == null)
|
|
throw new ArgumentNullException("action");
|
|
_action = action;
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
_action();
|
|
}
|
|
}
|
|
} |