示例#1
0
        public List <ProfileElement> GetAllProfileElementsOfType(ProfileElementTypes type)
        {
            List <ProfileElement> elementsOfType = new List <ProfileElement>();

            if (profileMap != null)
            {
                profileMap.TryGetValue(type, out elementsOfType);
            }
            return(elementsOfType);
        }
示例#2
0
        //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);
        }