Esempio n. 1
0
        /// <summary>
        /// Creates Exit Condition Rule
        /// </summary>
        /// <param name="conditions">Sequencing Rule Conditions.</param>
        /// <param name="ruleAction">Action.</param>
        /// <returns>ExitConditionRuleType generated from arguments.</returns>
        public static ExitConditionRuleType CreateExitConditionRule(ConditionCombinationType conditionCombination, IEnumerable<SequencingRuleTypeRuleConditionsRuleCondition> conditions, ExitConditionRuleActionType ruleAction)
        {
            ExitConditionRuleType result = new ExitConditionRuleType();
            result.ruleConditions = new SequencingRuleTypeRuleConditions();
            result.ruleConditions.conditionCombination = conditionCombination;
            result.ruleConditions.ruleCondition = new ManifestNodeList<SequencingRuleTypeRuleConditionsRuleCondition>(result.ruleConditions);
            result.ruleConditions.ruleCondition.AddRange(conditions);
            result.ruleAction = new ExitConditionRuleTypeRuleAction();
            result.ruleAction.action = ruleAction;

            return result;
        }
Esempio n. 2
0
        /// <summary>
        /// Creates Exit Condition Rule
        /// </summary>
        /// <param name="conditions">Sequencing Rule Conditions.</param>
        /// <param name="ruleAction">Action.</param>
        /// <returns>ExitConditionRuleType generated from arguments.</returns>
        public static ExitConditionRuleType CreateExitConditionRule(ConditionCombinationType conditionCombination, IEnumerable <SequencingRuleTypeRuleConditionsRuleCondition> conditions, ExitConditionRuleActionType ruleAction)
        {
            ExitConditionRuleType result = new ExitConditionRuleType();

            result.ruleConditions = new SequencingRuleTypeRuleConditions();
            result.ruleConditions.conditionCombination = conditionCombination;
            result.ruleConditions.ruleCondition        = new ManifestNodeList <SequencingRuleTypeRuleConditionsRuleCondition>(result.ruleConditions);
            result.ruleConditions.ruleCondition.AddRange(conditions);
            result.ruleAction        = new ExitConditionRuleTypeRuleAction();
            result.ruleAction.action = ruleAction;

            return(result);
        }
Esempio n. 3
0
        /// <summary>
        /// Creates Rollup Rule
        /// </summary>
        /// <param name="childActivitySet">Child activity set.</param>
        /// <param name="conditions">Rollup conditions</param>
        /// <param name="action">Rollup action.</param>
        /// <returns>Rollup rule initialized with arguments.</returns>
        public static RollupRuleType CreateRollupRule(ChildActivityType childActivitySet, ConditionCombinationType conditionCombination, [NotNull] IEnumerable <RollupRuleTypeRollupConditionsRollupCondition> conditions, RollupActionType action)
        {
            RollupRuleType result = new RollupRuleType();

            result.childActivitySet = childActivitySet;
            result.rollupConditions = new RollupRuleTypeRollupConditions();
            result.rollupConditions.rollupCondition      = new ManifestNodeList <RollupRuleTypeRollupConditionsRollupCondition>(result.rollupConditions);
            result.rollupConditions.conditionCombination = conditionCombination;
            result.rollupConditions.rollupCondition.AddRange(conditions);
            result.rollupAction        = new RollupRuleTypeRollupAction();
            result.rollupAction.action = action;

            return(result);
        }
Esempio n. 4
0
 public RollupRuleTypeRollupConditions()
 {
     conditionCombinationField = ConditionCombinationType.any;
 }
Esempio n. 5
0
 public SequencingRuleTypeRuleConditions()
 {
     conditionCombinationField = ConditionCombinationType.all;
 }
Esempio n. 6
0
        /// <summary>
        /// Creates Rollup Rule
        /// </summary>
        /// <param name="childActivitySet">Child activity set.</param>
        /// <param name="conditions">Rollup conditions</param>
        /// <param name="action">Rollup action.</param>
        /// <returns>Rollup rule initialized with arguments.</returns>
        public static RollupRuleType CreateRollupRule(ChildActivityType childActivitySet, ConditionCombinationType conditionCombination, [NotNull]IEnumerable<RollupRuleTypeRollupConditionsRollupCondition> conditions, RollupActionType action)
        {
            RollupRuleType result = new RollupRuleType();
            result.childActivitySet = childActivitySet;
            result.rollupConditions = new RollupRuleTypeRollupConditions();
            result.rollupConditions.rollupCondition = new ManifestNodeList<RollupRuleTypeRollupConditionsRollupCondition>(result.rollupConditions);
            result.rollupConditions.conditionCombination = conditionCombination;
            result.rollupConditions.rollupCondition.AddRange(conditions);
            result.rollupAction = new RollupRuleTypeRollupAction();
            result.rollupAction.action = action;

            return result;
        }