예제 #1
0
 public SecuredConnector(){
     try {
         r_connector = new RawConnector();
     } catch(Exception e){
         throw new RawInitException(e, "Err_RawConnectorImpossibleConnection " + e.Message +","+e.StackTrace , ExceptionGravity.SEVERE);
     }
 }
예제 #2
0
 public SecuredConnector()
 {
     try {
         r_connector = new RawConnector();
     } catch (Exception e) {
         throw new RawInitException(e, "Err_RawConnectorImpossibleConnection " + e.Message + "," + e.StackTrace, ExceptionGravity.SEVERE);
     }
 }
예제 #3
0
        public void TestCreateRaw()
        {
            RawConnector rc = new RawConnector();

            Assert.IsNotNull(rc);
            SysInfo info = new SysInfo();

            info.Environment = Environment.OSVersion.VersionString;
            var data = RedX.Diagnostics.Client.SystemDiagnostics.SystemInfo();

            info.PercentageCPU = data[0];
            info.PercentageRAM = data[1];
            info.Date          = DateTime.Now;

            Console.WriteLine(info.Date.ToString("yyyy-MM-dd HH:mm:ss"));
            Console.WriteLine(rc.Add(info));
            Assert.IsTrue(rc.History().Count > 0);
            rc.History().RemoveAt(0);
        }