public static void doRecursiveEl(EA.Repository rep, EA.Element el, FindAndReplace fr)
{
// perform element
if (fr.isElementSearch)
{
fr.FindStringInItem(EA.ObjectType.otElement, el.ElementGUID);
if (fr.isTagSearch)
{
FindMatchingElementTaggedValue(rep, el, fr);
}
}
if (fr.isAttributeSearch)
{
foreach (EA.Attribute a in el.Attributes)
{
fr.FindStringInItem(EA.ObjectType.otAttribute, a.AttributeGUID);
if (fr.isTagSearch)
{
FindMatchingAttributeTaggedValue(rep, a, fr);
}
}
}
if (fr.isOperationSearch)
{
foreach (EA.Method m in el.Methods)
{
fr.FindStringInItem(EA.ObjectType.otMethod, m.MethodGUID);
if (fr.isTagSearch)
{
FindMatchingMethodTaggedValue(rep, m, fr);
}
}
}
// perform diagrams of package
if (fr.isDiagramSearch)
{
foreach (EA.Diagram dia in el.Diagrams)
{
if (dia != null)
{
fr.FindStringInItem(EA.ObjectType.otDiagram, dia.DiagramGUID);
}
}
}
//run all elements
foreach (EA.Element elTrgt in el.Elements)
{
doRecursiveEl(rep, elTrgt, fr);
}
return;
}