public static string[] FindAllActionNameByTypeAndSourceState( OAdEntityDef entityDef, string srcState, int matchingActionDefType) { List <string> retVal = new List <string>(); // find all possible destination state object[] allStateObjs = CQWrapper.GetStateDefNames(entityDef) as object[]; if (null != allStateObjs) { foreach (object destStateObj in allStateObjs) { string destState = destStateObj as string; if (!string.IsNullOrEmpty(destState)) { object[] transitions = CQWrapper.DoesTransitionExist(entityDef, srcState, destState) as object[]; string[] actionDefNames = FindActionNameByType(entityDef, transitions, matchingActionDefType); retVal.AddRange(actionDefNames.AsEnumerable()); } } } return(retVal.ToArray()); }
public static string[] FindAllActionNameByTypeAndStateTransition( OAdEntityDef entityDef, string srcState, string destState, int matchingActionDefType) { if (string.IsNullOrEmpty(srcState)) { throw new ArgumentNullException("srcState"); } if (string.IsNullOrEmpty(destState)) { throw new ArgumentNullException("destState"); } List <string> retVal = new List <string>(); object[] transitions = CQWrapper.DoesTransitionExist(entityDef, srcState, destState) as object[]; string[] actionDefNames = FindActionNameByType(entityDef, transitions, matchingActionDefType); retVal.AddRange(actionDefNames.AsEnumerable()); return(retVal.ToArray()); }