/// <summary> /// Initializes a new instance of the <see cref="AllergyReaction"/> class. /// </summary> /// <param name="reaction">The reaction.</param> protected internal AllergyReaction( Reaction reaction ) { Check.IsNotNull ( reaction, "reaction is required." ); _reaction = reaction; }
/// <summary> /// Adds the reaction. /// </summary> /// <param name="reaction">The reaction.</param> /// <returns>An AllergyReaction. /// </returns> public virtual AllergyReaction AddReaction( Reaction reaction ) { Check.IsNotNull ( reaction, "reaction is required." ); var allergyReaction = new AllergyReaction ( reaction ) { Allergy = this }; _allergyReactions.Add ( allergyReaction ); NotifyItemAdded ( () => AllergyReactions, allergyReaction ); return allergyReaction; }