コード例 #1
0
ファイル: JsonsTests.cs プロジェクト: yzhang226/RadarClient
        public void ToJsonTest()
        {
            DateTime dt    = DateTime.Now;
            long     mills = KK.ToMills(dt);
            DateTime dt2   = KK.ToDateTime(mills);

            Console.Out.WriteLine("mills is " + mills);

            PriceActionRequest req = new PriceActionRequest();

            req.MachineCode    = "123456";
            req.OccurTime      = DateTime.Now;
            req.ScreenTime     = DateTime.Now;
            req.UsedDelayMills = 23;

            string json    = Jsons.ToJson(req);
            string reqText = req.ToLine();


            Console.Out.WriteLine("json is " + json);
        }
コード例 #2
0
 public string ToLine()
 {
     return(MachineCode + ";" + KK.ToMills(OccurTime) + ";" + KK.ToMills(ScreenTime) + ";" + Action + ";" + ScreenPrice + ";" + TargetPrice + ";" + UsedDelayMills + ";" + Memo);
 }