/// <summary> /// Clone Constructor /// </summary> /// <param name="other">the reaction to clone</param> public AppraisalRule(AppraisalRule other) { m_id = other.m_id; EventName = other.EventName; Conditions = new ConditionSet(other.Conditions); AppraisalVariables = other.AppraisalVariables; }
/// <summary> /// Clone Constructor /// </summary> /// <param name="other">the reaction to clone</param> public AppraisalRule(AppraisalRule other) { m_id = other.m_id; EventName = other.EventName; if (other.Conditions == null || other.Conditions.Count == 0) { Conditions = new ConditionSet(); } else { Conditions = new ConditionSet(other.Conditions); } AppraisalVariables = other.AppraisalVariables; }
public AppraisalRule(AppraisalRuleDTO appraisalRuleDTO) { m_id = (appraisalRuleDTO.Id == Guid.Empty)?Guid.NewGuid() : appraisalRuleDTO.Id; EventName = (Name)appraisalRuleDTO.EventMatchingTemplate; if (appraisalRuleDTO.AppraisalVariables != null) { AppraisalVariables = appraisalRuleDTO.AppraisalVariables; } else { AppraisalVariables = new AppraisalVariables(); } Conditions = appraisalRuleDTO.Conditions == null ? new ConditionSet() : new ConditionSet(appraisalRuleDTO.Conditions); }