/// <summary> /// /// </summary> /// <param name="manager"></param> /// <param name="to">after combine will live</param> /// <param name="from">after combine will dead</param> /// <returns></returns> public async Task<CombineResult> CanCombineAsync(VideoInfoManager manager, JryVideoInfo to, JryVideoInfo from) { var result = await manager.CanCombineAsync(to.Id, from.Id); if (!result.CanCombine) return result; result = await this.VideoRoleManager.CanCombineAsync(to.Id, from.Id); if (!result.CanCombine) return result; return CombineResult.True; }
/// <summary> /// /// </summary> /// <param name="manager"></param> /// <param name="to">after combine will live</param> /// <param name="from">after combine will dead</param> /// <returns></returns> public async Task<CombineResult> CombineAsync(VideoInfoManager manager, JryVideoInfo to, JryVideoInfo from) { var result = await this.CanCombineAsync(manager, to, from); if (result.CanCombine) { await this.VideoRoleManager.CombineAsync(to.Id, from.Id); await manager.CombineAsync(to, from); } return result; }