Ejemplo n.º 1
0
 public static string GetDisplayName(this BloodType bloodType)
 {
     return(bloodType.GetType()
            .GetMember(bloodType.ToString())
            .First()
            .GetCustomAttribute <DisplayAttribute>()
            .GetName());
 }
Ejemplo 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}");
 }
Ejemplo n.º 3
0
        public string ToFormattedString()
        {
            string factor;

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