public override void SetProperty(T t, string value) { var lst = t.GetMaxQuantItemList(); if (lst == null) { lst = new MaxQuantItemList(); t.SetMaxQuantItemList(lst); } MaxQuantItem item; if (dsName.Length == 0) { if (lst.BestItem == null) { lst.BestItem = new MaxQuantItem(); } item = lst.BestItem; } else { item = FindItem(lst); if (item == null) { item = new MaxQuantItem() { Name = dsName }; lst.Add(item); } } SetValue(item, value); }
public static void SetMaxQuantItemList(this IAnnotation ann, MaxQuantItemList value) { ann.Annotations[KEY] = value; }
protected MaxQuantItem FindItem(MaxQuantItemList lst) { return(lst.Find(m => m.Name.Equals(dsName))); }