/// <summary> /// 执行需要延迟锁的操作,如果之前没有锁,则不延迟 /// </summary> /// <param name="description"></param> /// <param name="action"></param> public void DoExtendLockAction(string description, Action action) { DoExtendLockAction(DELockSettings.GetConfig().DefaultEffectiveTime, description, action); }
public void AddLock(string description) { AddLock(DELockSettings.GetConfig().DefaultEffectiveTime, description); }
/// <summary> /// 执行需要上锁的操作 /// </summary> /// <param name="autoAddLock">是否自动加锁</param> /// <param name="description"></param> /// <param name="action"></param> public void DoAddLockAction(bool autoAddLock, string description, Action action) { DoAddLockAction(autoAddLock, DELockSettings.GetConfig().DefaultEffectiveTime, description, action); }
//public const string SynchronizationLockID = "0b3c3556-cef0-41a4-b84c-7f4ea2c4cffb"; public DELock() { this.EffectiveTime = DELockSettings.GetConfig().DefaultEffectiveTime; }