public void Vote(Ballot ballot) { if (DateTime.Now.Second%2 == 0) { ballot.Fatal("ERROR: This should error every other second"); return; } ballot.Healthy(); }
public void Vote(Ballot ballot) { using (var c = new ServiceController(_serviceName)) { if (c.Status != ServiceControllerStatus.Running) { ballot.Fatal("Service Controller reports '{0}' is not in the running state.".FormatWith(_serviceName)); return; } ballot.Healthy(); } }
public void Vote(Ballot ballot) { using(var c = new ServiceController(_serviceName)) { if(c.Status != ServiceControllerStatus.Running) { ballot.Fatal("Service Controller reports '{0}' is not in the running state.".FormatWith(_serviceName)); return; } ballot.Healthy(); } }