示例#1
0
        internal override void LoadDataFromXml(XmlElement element)
        {
            Clear();

            CheckTagName(element);

            XmlNodeList childList = element.ChildNodes;

            if (childList == null || childList.Count <= 0)
            {
                return;
            }

            foreach (XmlElement childElement in childList)
            {
                ActionType type = ActionType.None;
                if (!LoadEnumFromChildElementInnerText <ActionType>("ActionType", childElement, ref type))
                {
                    // Ignore unknown configuration
                    continue;
                }

                InteractionAction action = InteractionActionFactory.CreateAction(InteractionCase, type);
                action.LoadDataFromXml(childElement);
                Add(action);
            }
        }
示例#2
0
        public IInteractionAction CreateAction(ActionType actionType)
        {
            InteractionAction action = InteractionActionFactory.CreateAction(this, actionType);

            if (action != null)
            {
                _actions.Add(action);
            }
            return(action);
        }