示例#1
0
        public static WorkflowStepDto?FromWorkflowStep(WorkflowStep step)
        {
            if (step == null)
            {
                return(null);
            }

            return(SimpleMapper.Map(step, new WorkflowStepDto
            {
                Transitions = step.Transitions.ToDictionary(
                    y => y.Key,
                    y => WorkflowTransitionDto.FromWorkflowTransition(y.Value) !)
            }));
示例#2
0
        public static WorkflowStepDto FromWorkflowStep(WorkflowStep step)
        {
            var response = SimpleMapper.Map(step, new WorkflowStepDto
            {
                Transitions = step.Transitions.ToDictionary(
                    y => y.Key,
                    y => WorkflowTransitionDto.FromWorkflowTransition(y.Value))
            });

            if (step.NoUpdate != null)
            {
                response.NoUpdate           = true;
                response.NoUpdateExpression = step.NoUpdate.Expression;
                response.NoUpdateRoles      = step.NoUpdate.Roles?.ToArray();
            }

            return(response);
        }