Esempio n. 1
0
 public static string GetDisplayName(this BloodType bloodType)
 {
     return(bloodType.GetType()
            .GetMember(bloodType.ToString())
            .First()
            .GetCustomAttribute <DisplayAttribute>()
            .GetName());
 }
Esempio n. 2
0
 public override string ToString()
 {
     return($"Id: {Id}, Name: {Name}, NameKana: {NameKana ?? "NULL"}, NameRomaji: {NameRomaji ?? "NULL"}, "
            + $"Nickname: {Nickname ?? "NULL"}, Gender: ({Gender?.ToString() ?? "NULL"}), "
            + $"Birthdate: {Birthdate.ToString() ?? "NULL"}, BloodType: ({BloodType?.ToString() ?? "NULL"}), "
            + $"Height: {Height?.ToString() ?? "NULL"}, Hometown: {Hometown ?? "NULL"}, "
            + $"DebutYear: {DebutYear?.ToString() ?? "NULL"}, SpouseName: {SpouseName ?? "NULL"}, "
            + $"Agency: ({Agency?.ToString() ?? "NULL"}), PictureUrl: {PictureUrl ?? "NULL"}, "
            + $"IsFavorite: {IsFavorite}, IsCompleted: {IsCompleted}, CreatedAt: {CreatedAt}, UpdatedAt: {UpdatedAt}");
 }
Esempio n. 3
0
        public string ToFormattedString()
        {
            string factor;

            if (RhesusFactor == RhesusFactor.POSITIVE)
            {
                factor = "+";
            }
            else
            {
                factor = "-";
            }
            return(BloodType.ToString() + factor);
        }
Esempio n. 4
0
 public override string ToString()
 {
     return(BloodType.ToString() + "," + RhesusFactor.ToString());
 }