private void UpdateDoorEnabledState(ACConfiguration configuration) { if (_systemProperties == null || string.IsNullOrEmpty(_systemProperties.Address)) { return; } var enabledACUnits = configuration.ACElements.OfType <ACUnit>().Select(acUnit => new Tuple <string, bool>(acUnit.Id, acUnit.IsEnabled)); _client.UpdateDoorEnabledStates(_systemProperties.AdminUser, _systemProperties.AdminPassword, enabledACUnits.ToArray()).Wait(); }