public MedicineInfo(Health health, PhysiologicalCharacteristics physiologicalCharacteristics, SportInfo sportInfo) { if (health == null) { throw new ArgumentNullException(nameof(health)); } if (physiologicalCharacteristics == null) { throw new ArgumentNullException(nameof(physiologicalCharacteristics)); } Health = health; PhysiologicalCharacteristics = physiologicalCharacteristics; SportInfo = sportInfo ?? new SportInfo(); }
public override int GetHashCode() { return(Health.GetHashCode() ^ PhysiologicalCharacteristics.GetHashCode() ^ SportInfo.GetHashCode()); }