public bool Search(string str)
 {
     if (ActionName.Contains(str) || LoopCount.ToString().Contains(str) || Interval.ToString().Contains(str) || PlayTime.ToString().Contains(str))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 2
0
 public bool InFilter(string filterText)
 {
     return(ModuleName.Contains(filterText) ||
            PageName.Contains(filterText) ||
            PageID.Contains(filterText) ||
            ActionName.Contains(filterText) ||
            ActionTitle.Contains(filterText) ||
            SqlGroupName.Contains(filterText) ||
            SqlTableName.Contains(filterText) ||
            SqlName.Contains(filterText) ||
            SqlDescription.Contains(filterText));
 }
        public virtual object Execute(StateMachineActionContext context)
        {
            if (!ActionName.Contains("::"))
            {
                return(StateMachine.ActionTaskManager.ExecuteTask(ActionName, context));
            }

            //An alternate task execute syntax is being supported now that will
            //allow any method on a named task to be invoked using the ::, following the syntax
            //TaskName::MethodName

            string taskName   = ActionName.Substring(0, ActionName.IndexOf("::"));
            string methodName = ActionName.Substring(ActionName.IndexOf("::") + 2);

            ITask task = StateMachine.ActionTaskManager.CreateTask(taskName);

            if (task != null)
            {
                var wrapper = new CustomExecMethodTaskWrapper(task, methodName);
                return(wrapper.Execute(StateMachine.ActionTaskManager.CreateTaskContext(context)));
            }

            throw new ArgumentException("A task with the name " + taskName + " could not be found.");
        }