public RelativeInfo(RelativeStatus relativeStatus, PersonInfo personInfo, string workPlace) { ChangeRelativeStatus(relativeStatus); if (personInfo == null) { throw new ArgumentNullException(nameof(personInfo)); } PersonInfo = personInfo; ChangeWorkPlace(workPlace); }
public static string ToRelativeStatusString(this RelativeStatus source) { switch (source) { case RelativeStatus.Mother: return("Мать"); case RelativeStatus.Father: return("Отец"); case RelativeStatus.Grandmother: return("Бабушка"); case RelativeStatus.Grandfather: return("Дедушка"); case RelativeStatus.Brother: return("Брат"); case RelativeStatus.Sister: return("Сестра"); case RelativeStatus.Wife: return("Жена"); case RelativeStatus.Son: return("Сын"); case RelativeStatus.Daughter: return("Дочь"); case RelativeStatus.Uncle: return("Дядя"); case RelativeStatus.Aunt: return("Тетя"); case RelativeStatus.Guardian: return("Опекун"); case RelativeStatus.Stepmother: return("Мачеха"); case RelativeStatus.Stepfather: return("Отчим"); case RelativeStatus.Stepson: return("Пасынок"); case RelativeStatus.Stepdaughter: return("Падчерица"); case RelativeStatus.MotherInLaw: return("Теща"); case RelativeStatus.FatherInLaw: return("Тесть"); } return(string.Empty); }
public override int GetHashCode() { return(RelativeStatus.GetHashCode() ^ PersonInfo.GetHashCode() ^ WorkPlace.GetHashCode()); }
public void ChangeRelativeStatus(RelativeStatus relativeStatus) { RelativeStatus = relativeStatus; }