public virtual IList <FlowElementType> FindFlowElementsInSubProcessOfType <FlowElementType>(SubProcess subProcess, bool goIntoSubprocesses) where FlowElementType : FlowElement { IList <FlowElementType> foundFlowElements = new List <FlowElementType>(); foreach (FlowElement flowElement in subProcess.FlowElements) { if (flowElement is FlowElementType) { foundFlowElements.Add((FlowElementType)flowElement); } if (flowElement is SubProcess) { if (goIntoSubprocesses) { ((List <FlowElementType>)foundFlowElements).AddRange(FindFlowElementsInSubProcessOfType <FlowElementType>((SubProcess)flowElement)); } } } return(foundFlowElements); }
public virtual IList <FlowElementType> FindFlowElementsInSubProcessOfType <FlowElementType>(SubProcess subProcess) where FlowElementType : FlowElement { return(FindFlowElementsInSubProcessOfType <FlowElementType>(subProcess, true)); }