public void HandleCommandExecuted(CommandEvent cmd) { Interlocked.Increment(ref _count); lock (_lock) { if (_lastCommands.Count > 50) _lastCommands.Clear(); _lastCommands.Add(cmd); } }
public void HandleCommandExecuted(CommandEvent cmd) { Interlocked.Increment(ref _count); lock (_lock) { if (_lastCommands.Count > 50) { _lastCommands.Clear(); } _lastCommands.Add(cmd); } }