public List<StarUML.IUMLModelElement> GetModelElements(StarUML.IUMLClassifier root, String stereotype, params Type[] types) { List<StarUML.IUMLModelElement> list = new List<StarUML.IUMLModelElement>(); for (int i = 0; i < root.GetOwnedElementCount(); i++) { StarUML.IUMLModelElement model = root.GetOwnedElementAt(i); foreach (Type type in types) { if ((model.GetType() == type) && (model.StereotypeName.Equals(stereotype))) { list.Add(model); } } } return list; }
public List<StarUML.IUMLModelElement> GetModelElements(StarUML.IUMLClassifier root) { List<StarUML.IUMLModelElement> list = new List<StarUML.IUMLModelElement>(); for (int i = 0; i < root.GetOwnedElementCount(); i++) { StarUML.IUMLModelElement model = root.GetOwnedElementAt(i); list.Add(model); } return list; }