private void TimerInvoke(object sender) { lock (_timerLocker) { ClientCommandRequest clientCommandRequest = new ClientCommandRequest(); _scheduleCommands.TryGetValue((Timer)sender, out clientCommandRequest); ClientCommandDTO clientCommand = _clientMediator.ProducingClientCommand(clientCommandRequest); _clientMediator.SendClientCommand(clientCommand); } }