~ruther/NosTale-Gfless

NosTale-Gfless/NostaleAuth/Models/GameforgeAccount.cs -rw-r--r-- 564 bytes
4f5eef52 — František Boháček chore: add license 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
using Newtonsoft.Json;

namespace NostaleAuth.Models
{
    public sealed class GameforgeAccount
    {
        public string Id { get; set; }

        [JsonProperty("displayName")]
        public string Name { get; set; }

        [JsonProperty("accountGroup")]
        public string Region { get; set; }

        public override string ToString() => $"{nameof(Id)}: {Id}, {nameof(Name)}: {Name}";

        public RegionType GetRegionType()
        {
            return (RegionType) Enum.Parse(typeof(RegionType), Region.ToUpper());
        }
    }
}
Do not follow this link