private void EndElection() { if (webApiService.GetStateOfElection().IsElectionStarted == false) { Console.WriteLine("You cannot end elecion. It has not started yet."); } if (webApiService.GetStateOfElection().IsElectionEnded == true) { Console.WriteLine("Election has been ended before."); } if (webApiService.GetStateOfElection().IsElectionStarted == true && webApiService.GetStateOfElection().IsElectionEnded == false) { webApiService.EndElection(); Console.WriteLine("Election process has been ended. Voting unavailable."); } }