public Honorific(string name, string abbreviation, GenderType genderType, HonorificType type) { Name = name; Abbreviation = abbreviation; GenderType = genderType; Type = type; }
/// <summary> /// /// </summary> /// <param name="genderType"></param> /// <param name="type"></param> /// <returns></returns> public Honorific Honorific(GenderType genderType = GenderType.Any, HonorificType type = HonorificType.Any) { var honorifics = _data.Honorifics.ToList(); if (genderType != GenderType.Any) honorifics = honorifics.Where(x => x.GenderType == genderType).ToList(); if (type != HonorificType.Any) honorifics = honorifics.Where(x => x.Type == type).ToList(); return Pick(honorifics); }