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"))); }
static CatContext DoTest() { var times = _rand.Next(1000); Thread.Sleep(times); PureCatClient.LogEvent("Do", nameof(DoTest), "0", $"sleep {times}"); return(PureCatClient.LogRemoteCallClient("callAdd")); }
static void Add2(int a, int b, CatContext context = null) { Thread.Sleep(_rand.Next(1000)); PureCatClient.LogRemoteCallServer(context); PureCatClient.LogEvent("Do", nameof(Add2), "0", $"{a} + {b} = {a + b}"); }