private static IEnumerable <ActionBase> GetStoredActions(Content content, string scenario, string scenarioParameters, string backUri) { if (!string.IsNullOrEmpty(scenario)) { // if the scenario name is given, try to load actions in that scenario var sc = ScenarioManager.GetScenario(scenario, scenarioParameters); if (sc != null) { return(sc.GetActions(content, backUri)); } } return(GetActionsFromContentRepository(content, scenario, backUri)); }
public static IEnumerable <ActionBase> GetActions(Content context, string[] scenarios, string backUri) { if (scenarios != null && scenarios.Length > 0) { var actions = new List <ActionBase>(); foreach (var scenario in scenarios) { var sc = ScenarioManager.GetScenario(scenario, null); if (sc != null) { actions.AddRange(sc.GetActions(context, backUri).Where(a => !actions.Exists(ba => ba.Name == a.Name))); } } return(actions); } return(GetActionsFromContentRepository(context, null, backUri)); }