public ReserveDataAppend GetReserveDataAppend(ReserveData master) { if (master == null) { return(null); } Dictionary <uint, ReserveDataAppend> dict = reserveAppendList; if (dict == null) { dict = ReserveList.ToDictionary(data => data.Key, data => new ReserveDataAppend()); reserveAppendList = dict; foreach (EpgAutoAddData item in EpgAutoAddList.Values) { item.GetReserveList().ForEach(info => dict[info.ReserveID].EpgAutoList.Add(item)); } foreach (ManualAutoAddData item in ManualAutoAddList.Values) { item.GetReserveList().ForEach(info => dict[info.ReserveID].ManualAutoList.Add(item)); } foreach (ReserveData item in ReserveList.Values.Where(data => data.IsEpgReserve == true)) { UInt64 key = item.Create64PgKey(); dict[item.ReserveID].MultipleEPGList.AddRange(ReserveList.Values.Where(data => data.Create64PgKey() == key && data != item)); } foreach (ReserveDataAppend data in dict.Values) { data.UpdateData(); } } ReserveDataAppend retv; if (dict.TryGetValue(master.ReserveID, out retv) == false) { retv = new ReserveDataAppend(); } return(retv); }
public ReserveDataAppend GetReserveDataAppend(ReserveData master) { if (master == null) { return(null); } Dictionary <uint, ReserveDataAppend> dict = reserveAppendList; if (dict == null) { dict = reserveList.ToDictionary(data => data.Key, data => new ReserveDataAppend()); reserveAppendList = dict; ReloadEpgAutoAddInfo();//notify残ってれば更新 foreach (EpgAutoAddData item in epgAutoAddList.Values) { item.GetReserveList().ForEach(info => dict[info.ReserveID].EpgAutoList.Add(item)); } ReloadManualAutoAddInfo();//notify残ってれば更新 foreach (ManualAutoAddData item in manualAutoAddList.Values) { item.GetReserveList().ForEach(info => dict[info.ReserveID].ManualAutoList.Add(item)); } foreach (ReserveDataAppend data in dict.Values) { data.UpdateData(); } } ReserveDataAppend retv; if (dict.TryGetValue(master.ReserveID, out retv) == false) { retv = new ReserveDataAppend(); } return(retv); }
public ReserveDataAppend GetReserveDataAppend(ReserveData master) { if (master == null) return null; Dictionary<uint, ReserveDataAppend> dict = reserveAppendList; if (dict == null) { dict = reserveList.ToDictionary(data => data.Key, data => new ReserveDataAppend()); reserveAppendList = dict; ReloadEpgAutoAddInfo();//notify残ってれば更新 foreach (EpgAutoAddData item in epgAutoAddList.Values) { item.GetReserveList().ForEach(info => dict[info.ReserveID].EpgAutoList.Add(item)); } ReloadManualAutoAddInfo();//notify残ってれば更新 foreach (ManualAutoAddData item in manualAutoAddList.Values) { item.GetReserveList().ForEach(info => dict[info.ReserveID].ManualAutoList.Add(item)); } foreach (ReserveDataAppend data in dict.Values) { data.UpdateData(); } } ReserveDataAppend retv; if (dict.TryGetValue(master.ReserveID, out retv) == false) { retv = new ReserveDataAppend(); } return retv; }