BrakePedal.MemoryThrottleRepository.SetLock C# (CSharp) Метод

SetLock() публичный Метод

public SetLock ( IThrottleKey key, BrakePedal.Limiter limiter ) : void
key IThrottleKey
limiter BrakePedal.Limiter
Результат void
        public void SetLock(IThrottleKey key, Limiter limiter)
        {
            string throttleId = CreateThrottleKey(key, limiter);
            _store.Remove(throttleId);

            string lockId = CreateLockKey(key, limiter);
            DateTime expiration = CurrentDate().Add(limiter.LockDuration.Value);
            _store.Set(lockId, true, expiration);
        }