using Newtonsoft.Json; using Rhea.Common; using System; namespace Tiger.IBusiness { /// /// 事务基类 /// public interface ITransaction { /// /// 事务ID /// public string TransID { get; set; } /// /// Api Host /// public string ApiHost { get; set; } /// /// Remote Address /// public string RemoteAddress { get; set; } /// /// 事务锁 /// public object TransLock { get; } /// /// 最后操作的时间 /// public DateTime LastActionTime { get; set; } /// /// 事务是否完成 /// public bool IsFinished { get; set; } /// /// 添加一个ApiAction的历史记录 /// /// /// /// public abstract void AddHistory(Microsoft.AspNetCore.Http.HttpRequest request, ApiAction action); /// /// 保存ApiAction的历史记录到文件 /// public abstract void SaveHistory(); /// /// 关闭事务 /// /// /// public abstract bool Close(bool needSaveHistoryLog = false); } }