Ejemplo n.º 1
0
        /// <summary>
        /// A ctor that accepts the parent container, the preceding and succeeding executables.
        /// </summary>
        /// <param name="parentContainer">The parent container in which the precedence constraint is to be added.</param>
        /// <param name="precedingExecutable">The preceding executable.</param>
        /// <param name="succeedingExecutable">The constrained or the succeeding executable.</param>
        public ISPrecedenceConstraint(ISEventsProviderAsIDTSSequence parentContainer, ISExecutable precedingExecutable, ISExecutable succeedingExecutable)
        {
            bool precedenceConstraintExists = false;

            for (int p = 0; p < parentContainer.PrecedenceConstraints_m.Count; p++)
            {
                PrecedenceConstraint pc = parentContainer.PrecedenceConstraints_m[p];
                if (pc.ConstrainedExecutable == succeedingExecutable.Executable && pc.PrecedenceExecutable == precedingExecutable.Executable)
                {
                    precedenceConstraintExists = true;
                    PrecedenceConstraint       = pc;
                }
            }

            if (!(precedenceConstraintExists))
            {
                PrecedenceConstraint = parentContainer.PrecedenceConstraints_m.Add(precedingExecutable.Executable, succeedingExecutable.Executable);
            }
        }
Ejemplo n.º 2
0
 public ISPrecedenceConstraint(ISEventsProviderAsIDTSSequence parentContainer, ISExecutable precedingExecutable, ISExecutable succeedingExecutable, PrecedenceEvalOp evalOp, ExecResult value)
     : this(parentContainer, precedingExecutable, succeedingExecutable)
 {
     EvalOp = evalOp;
     Value  = value;
 }