예제 #1
0
 /// <summary>
 /// Sends a Stats command to view Server information and statistics
 /// </summary>
 /// <param name="stat"></param>
 public void SendStats(ServerStat stat)
 {
     _IRC.SendTCPMessage(string.Format("STATS {0}", stat));
     if (StatsCommandEvent != null)
     {
         StatsCommandEvent(this, new StatsCommand {
             Stat = stat.ToString()
         });
     }
 }
예제 #2
0
 public void SendStats(ServerStat stat, string parameter)
 {
     _IRC.SendTCPMessage(string.Format("STATS {0} {1}", stat, parameter));
     if (StatsCommandEvent != null)
     {
         StatsCommandEvent(this, new StatsCommand {
             Stat = stat.ToString(), Parameter = parameter
         });
     }
 }
예제 #3
0
        public void ToStringTest()
        {
            string expected = "10,20,30,40,50,60";

            ServerStat stats = new ServerStat();

            stats.CpuIdle           = 10;
            stats.CpuOther          = 20;
            stats.CpuSql            = 30;
            stats.MemoryUtilization = 40;
            stats.TotalSpace        = 50;
            stats.AvailableSpace    = 60;

            Assert.AreEqual(expected, stats.ToString());
        }