Esempio n. 1
0
        public void TestExtendedWillPaySerialization()
        {
            var packet = new RaceExtendedWillPayUpdate
            {
                NumberOfCombinations = 3,
                Declarations         = new List <uint>(),
                CombinationTotal     = new List <uint>()
            };
            var c1 = 1 << 16 | 2;
            var c2 = 1 << 16 | 3;
            var c3 = 1 << 16 | 4;

            packet.Declarations.Add((uint)c1);
            packet.Declarations.Add((uint)c2);
            packet.Declarations.Add((uint)c3);
            packet.CombinationTotal.Add(100);
            packet.CombinationTotal.Add(200);
            packet.CombinationTotal.Add(300);

            var serialized = JsonConvert.SerializeObject(packet);

            Assert.IsNotNull(packet);
        }
Esempio n. 2
0
 private void _gateway_OnRaceExtendedWillPayUpdate(RaceExtendedWillPayUpdate obj)
 {
     Log(JsonConvert.SerializeObject(obj));
     LogFeed("RaceExtendedWillPayUpdate", obj);
 }