private void Lock() { SCLock syncLock = new SCLock() { LockID = SynchronizationLockID, LockType = SCLockType.DataOperation }; syncLock.EffectiveTime = SynchronizationEffectiveTime; syncLock.Description = "AD反向同步到权限中心"; SCCheckLockResult checkResult = SCLockAdapter.Instance.AddLock(syncLock); if (checkResult.Available == false) { throw new SCCheckLockException(SCCheckLockException.CheckLockResultToMessage(checkResult)); } this.synchronizeLock = syncLock; this.lastExtendLockTime = DateTime.Now; }
public void AddLock() { SCLock syncLock = new SCLock() { LockID = SCLock.DefaultDataOperationLockID, LockType = SCLockType.DataOperation }; syncLock.EffectiveTime = SynchronizationEffectiveTime; syncLock.Description = "权限中心同步到AD"; SCCheckLockResult checkResult = SCLockAdapter.Instance.AddLock(syncLock); if (checkResult.Available == false) { throw new SCCheckLockException(SCCheckLockException.CheckLockResultToMessage(checkResult)); } this._SynchronizeLock = syncLock; this._LastExtendLockTime = SNTPClient.AdjustedTime; }