/// <summary> /// Получаем контейнер по UID /// </summary> /// <param name="container"></param> public static BulletinPackageContainerBase Get(Guid uid) { BulletinPackageContainerBase result = null; DCT.Execute((data) => { result = containerList.FirstOrDefault(q => q.Uid == uid); }); return(result); }
/// <summary> /// Добавляем новый контейнер /// </summary> /// <param name="container"></param> public static void Add(BulletinPackageContainerBase container) { DCT.Execute((data) => { if (containerList.Any(q => container.Uid == q.Uid)) { throw new Exception("IBulletinContainer уже добавлен, UID контейнера " + container.Uid); } containerList.Add(container); }); }