/// <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() }); } }
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 }); } }
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()); }