public bool Start() { if (disposedValue) { throw new ObjectDisposedException(nameof(StreamMonitor)); } _danMuClient.Start(); _httpTimer.Start(); Check(TriggerType.HttpApiFirstCheck); return(true); }
//[TestMethod] public async Task DanMuTest() { const int roomId = 40462; using var client = new DanMuClient(roomId, TimeSpan.FromSeconds(2)); client.ReceivedDanmaku += (o, args) => { var danMu = args.Danmaku; Debug.WriteLine(danMu.UserName); Debug.WriteLine(danMu.CommentText); Debug.WriteLine(danMu.MsgType); }; client.Start(); await Task.Delay(TimeSpan.FromSeconds(30)); }