Exemple #1
0
        static CatContext DoTest()
        {
            var times = _rand.Next(1000);

            Thread.Sleep(times);
            PureCatClient.LogEvent("Do", nameof(DoTest), "0", $"sleep {times}");
            return(PureCatClient.LogRemoteCallClient("callAdd"));
        }
Exemple #2
0
        static void Add(int a, int b, CatContext context = null)
        {
            Thread.Sleep(_rand.Next(1000));
            PureCatClient.LogRemoteCallServer(context);
            PureCatClient.LogEvent("Do", nameof(Add), "0", $"{a} + {b} = {a + b}");

            Task.Factory.StartNew(() => PureCatClient.DoTransaction("Do", nameof(Add2), () => PureCatClient.LogRemoteCallClient("callAdd2")));
        }