public DataItemInfo(DataItemDefinition definition, List <ComponentDefinition> components) { Id = definition.Id; Type = definition.Type; ParentId = definition.ParentId; SubType = definition.SubType; Parents = GetParents(definition.ParentId, components); IsMultiplePath = components.FindAll(o => o.Type == "Path").Count > 1 && Parents.Exists(o => o.Type == "Path"); }
public int AddParent(ICell parent) { int add = 0; if (Parents == null) { Parents = new List <ICell>(); } if (!Parents.Exists(x => x == parent)) { Parents.Add(parent); add++; } return(add); }