forked from tomrus88/WoW-Community-Platform-API
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Realm.cs
71 lines (65 loc) · 1.63 KB
/
Realm.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
using System;
using System.Runtime.Serialization;
namespace WCPAPI
{
public enum RealmType
{
PvP,
PvE,
RP,
RPPvP
}
public enum RealmPopulation
{
Low,
Medium,
High,
Full
}
[DataContract]
public class Realm
{
#pragma warning disable 0649
[DataMember(Name = "type")]
private string m_type;
[DataMember(Name = "population")]
private string m_population;
[DataMember(Name = "queue")]
public bool Queue { get; private set; }
[DataMember(Name = "status")]
public bool Status { get; private set; }
[DataMember(Name = "name")]
public string Name { get; private set; }
[DataMember(Name = "slug")]
public string Slug { get; private set; }
[DataMember(Name = "battlegroup")]
public string Battlegroup { get; private set; }
#pragma warning restore 0649
public RealmType Type
{
get
{
return (RealmType)Enum.Parse(typeof(RealmType), m_type, true);
}
}
public RealmPopulation Population
{
get
{
return (RealmPopulation)Enum.Parse(typeof(RealmPopulation), m_population, true);
}
}
public string[] ToStringArray()
{
return new string[]
{
Name,
Battlegroup,
Type.ToString(),
Population.ToString(),
Queue.ToString(),
Status.ToString()
};
}
}
}