/// <summary> /// 直播间状态检查 /// </summary> /// <returns></returns> private static async Task <bool> LiveRoomStateCheck(User user) { try { string info = await LoginApi.GetInfoAsync(user); if (string.IsNullOrEmpty(info)) { if (!await user.Login()) { throw new Exception("User login failed. exit."); } } LiveRoomStreamDataInfo roomInfo = await LiveApi.GetRoomInfo(user); if (roomInfo == null) { return(false); } return(true); } catch { return(false); } }