/// <summary> /// Returns an action by its name /// </summary> /// <param name="actionName"></param> /// <returns></returns> static public FlowAction GetActionByName(string actionName) { actionName = FlowActions.CleanName(actionName, true); if (actions.TryGetValue(actionName, out FlowAction realAction)) { return(realAction); } return(null); }
/// <summary> /// Registers a single action component /// </summary> /// <param name="action"></param> private void RegisterAction(FlowAction action) { string actionName = FlowActions.CleanName(action.GetType().Name, true); if (actions.TryGetValue(actionName, out FlowAction flowAction)) { return; } ActionCount++; actions.Add(actionName, action); actionsByID.Add(ActionCount, action); action.id = ActionCount; action.settings = settings; action.writer = writer; action.processor = processor; action.isClient = isClient; action.SubscribePackage(); }