public override BaseAction Clone()
        {
            var basAction = new ResourceTemplateAction(Name)
            {
                ActionInParameterManager  = ActionInParameterManager.Clone(),
                ActionOutParameterManager = ActionOutParameterManager.Clone(),
            };

            return(basAction);
        }
        private void LoadActionsForMachineTemplate(IEnumerable level1Node)
        {
            foreach (XmlNode level2Node in level1Node)
            {
                if (level2Node.NodeType == XmlNodeType.Comment)
                {
                    continue;
                }

                var level2Item = (XmlElement)level2Node;

                // 动态创建Action
                var name = level2Item.GetAttribute("Name");
                // var actionType = level2Item.GetAttribute("Type");

                var action = new ResourceTemplateAction(name);
                // var action = (MachineAction) ActionsManagement.CreateAction(actionType, name);

                if (action.LoadFromConfig(level2Item))
                {
                    // 加入到MachineResourceTemplate的Action集合
                    try
                    {
                        AddAction(action);
                    }
                    catch (Exception ex)
                    {
                        Log.Error($"加载资源模板{TemplateName} 的Action:{name}出错:{ex}");
                    }
                }
                else
                {
                    Log.Error($"加载资源模板{TemplateName} 的Action:{name}出错");
                }

                HasActions = true;
            }
        }
 private void AddAction(ResourceTemplateAction action)
 {
     _resourceTemplateActionsActions.Add(action);
 }