-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGlobal.cs
62 lines (52 loc) · 1.65 KB
/
Global.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
using Discord.WebSocket;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Collections.Generic;
using System.Globalization;
namespace Warframebot
{
internal static class Global
{
internal static DiscordSocketClient Client { get; set; }
internal static ulong MessageIdToTrack { get; set; }
internal static bool DownloadDone { get; set; }
}
public class SolNodeTmp
{
public string Name { get; set; }
public string Value { get; set; }
}
public class SortieData
{
public string Name { get; set; }
public string Seed { get; set; }
public string ModType { get; set; }
public string ModDesc { get; set; }
}
public partial class Mp3List
{
[JsonProperty("File Name")]
public string FileName { get; set; }
[JsonProperty("Path")]
public string Path { get; set; }
}
public partial class Mp3List
{
public static Dictionary<string, Mp3List> FromJson(string json) => JsonConvert.DeserializeObject<Dictionary<string, Mp3List>>(json, Mp3ListConverter.Settings);
}
public static class Serialize
{
public static string ToJson(this Dictionary<string, Mp3List> self) => JsonConvert.SerializeObject(self, Mp3ListConverter.Settings);
}
internal static class Mp3ListConverter
{
public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
{
MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
DateParseHandling = DateParseHandling.None,
Converters = {
new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
},
};
}
}