Ejemplo n.º 1
0
        public void Vote(Ballot ballot)
        {
            if (DateTime.Now.Second%2 == 0)
            {
                ballot.Fatal("ERROR: This should error every other second");
                return;
            }

            ballot.Healthy();
        }
Ejemplo n.º 2
0
        public void Vote(Ballot ballot)
        {
            if (DateTime.Now.Second%2 == 0)
            {
                ballot.Fatal("ERROR: This should error every other second");
                return;
            }

            ballot.Healthy();
        }
Ejemplo n.º 3
0
 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();
     }
 }
Ejemplo n.º 4
0
 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();
     }
 }