public void AddReferenceHeadend(MxfDvbsHeadend headend) { var refHead = DvbsDataSet._allHeadends.SingleOrDefault(arg => arg.IdRef?.Equals(headend.Uid) ?? false); if (refHead != null) { return; } DvbsDataSet._allHeadends.Add(new MxfDvbsHeadend { IdRef = headend.Uid }); }
public MxfDvbsHeadend GetOrCreateHeadend(int csiId) { var headend = DvbsDataSet._allHeadends.SingleOrDefault(arg => arg.CsiId == csiId); if (headend != null) { return(headend); } headend = new MxfDvbsHeadend { CsiId = csiId, _channels = new List <MxfDvbsChannel>() }; DvbsDataSet._allHeadends.Add(headend); return(headend); }