Beispiel #1
0
 public Honorific(string name, string abbreviation, GenderType genderType, HonorificType type)
 {
     Name = name;
       Abbreviation = abbreviation;
       GenderType = genderType;
       Type = type;
 }
Beispiel #2
0
        /// <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);
        }