public FamilyInfo(ParentFamilyStatus parentFamilyStatus, IEnumerable <RelativeInfo> relatives) : this(parentFamilyStatus) { if (relatives == null) { throw new ArgumentNullException(nameof(relatives)); } foreach (var relative in relatives) { AddRelative(relative); } }
public static string ToParentFamilyStatusString(this ParentFamilyStatus source) { switch (source) { case ParentFamilyStatus.Full: return("Полная"); case ParentFamilyStatus.OnlyMother: return("Только мать"); case ParentFamilyStatus.OnlyFather: return("Только отец"); case ParentFamilyStatus.Relatives: return("Родственники"); case ParentFamilyStatus.Guardianship: return("Опекунство"); case ParentFamilyStatus.BoardingSchool: return("Школа-интернат"); case ParentFamilyStatus.AnOrphan: return("Сирота"); } return(string.Empty); }
public FamilyInfo(ParentFamilyStatus parentFamilyStatus) { ParentFamilyStatus = parentFamilyStatus; _relatives = new RelativeInfo[MaxRelativesCount]; }
public override int GetHashCode() { return(ParentFamilyStatus.GetHashCode() ^ Relatives.GetHashCode()); }
public void ChangeParentFamilyStatus(ParentFamilyStatus parentFamilyStatus) { ParentFamilyStatus = parentFamilyStatus; }