/// <summary> /// Determines if the values are equal. /// </summary> /// <param name="securityQuestion"> /// The other object. /// </param> /// <returns> /// A boolean denoting equality of the values. /// </returns> public virtual bool ValuesEqual(SecurityQuestion securityQuestion) { if (securityQuestion == null) { return(false); } var valuesEqual = Equals(_questionNote, securityQuestion._questionNote) && Equals(_answerNote, securityQuestion._answerNote); return(valuesEqual); }
/// <summary> /// Adds the security question. /// </summary> /// <param name="securityQuestion">The security question.</param> public virtual void AddSecurityQuestion(SecurityQuestion securityQuestion) { Check.IsNotNull(securityQuestion, "Security question is required."); DomainRuleEngine.CreateRuleEngine <SystemAccount, SecurityQuestion> (this, () => AddSecurityQuestion) .WithContext(securityQuestion) .Execute( () => { securityQuestion.SystemAccount = this; _securityQuestions.Add(securityQuestion); NotifyItemAdded(() => _securityQuestions, securityQuestion); }); }
/// <summary> /// Determines if the values are equal. /// </summary> /// <param name="securityQuestion"> /// The other object. /// </param> /// <returns> /// A boolean denoting equality of the values. /// </returns> public virtual bool ValuesEqual(SecurityQuestion securityQuestion) { if (securityQuestion == null) { return false; } var valuesEqual = Equals(_questionNote, securityQuestion._questionNote) && Equals(_answerNote, securityQuestion._answerNote); return valuesEqual; }
/// <summary> /// Removes the security question. /// </summary> /// <param name="securityQuestion">The security question.</param> public virtual void RemoveSecurityQuestion(SecurityQuestion securityQuestion) { Check.IsNotNull(securityQuestion, "Security question is required."); _securityQuestions.Remove(securityQuestion); NotifyItemRemoved(() => SecurityQuestions, securityQuestion); }
/// <summary> /// Adds the security question. /// </summary> /// <param name="securityQuestion">The security question.</param> public virtual void AddSecurityQuestion(SecurityQuestion securityQuestion) { Check.IsNotNull(securityQuestion, "Security question is required."); DomainRuleEngine.CreateRuleEngine<SystemAccount, SecurityQuestion> ( this, () => AddSecurityQuestion ) .WithContext ( securityQuestion ) .Execute ( () => { securityQuestion.SystemAccount = this; _securityQuestions.Add ( securityQuestion ); NotifyItemAdded ( () => _securityQuestions, securityQuestion ); } ); }