コード例 #1
0
ファイル: AllergyReaction.cs プロジェクト: divyang4481/REM
 /// <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;
 }
コード例 #2
0
ファイル: Allergy.cs プロジェクト: divyang4481/REM
        /// <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;
        }