示例#1
0
        public override BaseElement Clone()
        {
            MultiInstanceLoopCharacteristics clone = new MultiInstanceLoopCharacteristics();

            clone.SetValues(this);
            return(clone);
        }
示例#2
0
 public void SetValues(MultiInstanceLoopCharacteristics otherLoopCharacteristics)
 {
     inputDataItem        = otherLoopCharacteristics.InputDataItem;
     loopCardinality      = otherLoopCharacteristics.LoopCardinality;
     completionCondition  = otherLoopCharacteristics.CompletionCondition;
     elementVariable      = otherLoopCharacteristics.ElementVariable;
     elementIndexVariable = otherLoopCharacteristics.ElementIndexVariable;
     sequential           = otherLoopCharacteristics.IsSequential;
 }
示例#3
0
        public void SetValues(Activity otherActivity)
        {
            base.SetValues(otherActivity);
            failedJobRetryTimeCycleValue = otherActivity.FailedJobRetryTimeCycleValue;
            defaultFlow     = otherActivity.DefaultFlow;
            forCompensation = otherActivity.ForCompensation;
            if (otherActivity.LoopCharacteristics != null)
            {
                loopCharacteristics = (MultiInstanceLoopCharacteristics)otherActivity.LoopCharacteristics.Clone();
            }
            if (otherActivity.IoSpecification != null)
            {
                ioSpecification = (IOSpecification)otherActivity.IoSpecification.Clone();
            }

            dataInputAssociations = new List <DataAssociation>();
            if (otherActivity.DataInputAssociations != null && otherActivity.DataInputAssociations.Count > 0)
            {
                foreach (DataAssociation association in otherActivity.DataInputAssociations)
                {
                    dataInputAssociations.Add((DataAssociation)association.Clone());
                }
            }

            dataOutputAssociations = new List <DataAssociation>();
            if (otherActivity.DataOutputAssociations != null && otherActivity.DataOutputAssociations.Count > 0)
            {
                foreach (DataAssociation association in otherActivity.DataOutputAssociations)
                {
                    dataOutputAssociations.Add((DataAssociation)association.Clone());
                }
            }

            boundaryEvents.Clear();
            foreach (BoundaryEvent _event in otherActivity.BoundaryEvents)
            {
                boundaryEvents.Add(_event);
            }
        }