示例#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();
        }
示例#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();
        }
示例#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();
     }
 }
 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();
     }
 }