public List <ProfileElement> GetAllProfileElementsOfType(ProfileElementTypes type) { List <ProfileElement> elementsOfType = new List <ProfileElement>(); if (profileMap != null) { profileMap.TryGetValue(type, out elementsOfType); } return(elementsOfType); }
//novo public void AddProfileElement(ProfileElementTypes tp, ProfileElement el) { List <ProfileElement> elementsOfSameType = null; if (allByType.ContainsKey(tp)) { allByType.TryGetValue(tp, out elementsOfSameType); } if (elementsOfSameType == null) { elementsOfSameType = new List <ProfileElement>(); } allByType.Remove(tp); elementsOfSameType.Add(el); allByType.Add(tp, elementsOfSameType); }