Exemplo n.º 1
0
        /// <summary>
        /// Получаем контейнер по UID
        /// </summary>
        /// <param name="container"></param>
        public static GroupContainerBase Get(string uid)
        {
            GroupContainerBase result = null;

            _DCT.Execute((data) =>
            {
                result = containerList.FirstOrDefault(q => q.Uid == uid);
            });
            return(result);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Добавляем новый контейнер
 /// </summary>
 /// <param name="container"></param>
 public static void Add(GroupContainerBase container)
 {
     _DCT.Execute((data) =>
     {
         if (containerList.Any(q => container.Uid == q.Uid))
         {
             throw new Exception("IBulletinContainer уже добавлен, UID контейнера " + container.Uid);
         }
         containerList.Add(container);
     }, _DCTGroup.BulletinContainerList);
 }