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