Пример #1
0
        private ITrigger CreateCVTrigger(WorkflowStepData param)
        {
            WorkflowStepTrigger trigger   = m_Instantiator.Instantiate <WorkflowStepTrigger>();
            QCCondition         condition = m_Instantiator.Instantiate <QCCondition>();

            condition.triggerId = param.triggerId;
            trigger.AddCondition(condition, true);
            trigger.advance = true;
            trigger.mode    = ConditionMode.and;
            m_DisposalService.Register(trigger, param.id);
            m_DisposalService.Register(condition, param.id);
            return(trigger);
        }
Пример #2
0
        private ITrigger CreateAutoTrigger(WorkflowStepData param)
        {
            WorkflowStepTrigger trigger   = m_Instantiator.Instantiate <WorkflowStepTrigger>();
            TimeCondition       condition = m_Instantiator.Instantiate <TimeCondition>();

            condition.time = TimeSpan.FromSeconds(param.durations[0]);
            trigger.AddCondition(condition, true);
            trigger.advance = true;
            trigger.mode    = ConditionMode.and;
            m_DisposalService.Register(trigger, param.id);
            m_DisposalService.Register(condition, param.id);
            return(trigger);
        }