aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Database/DetailsHelper.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/Database/DetailsHelper.cs b/Database/DetailsHelper.cs
new file mode 100644
index 0000000..4053594
--- /dev/null
+++ b/Database/DetailsHelper.cs
@@ -0,0 +1,14 @@
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Newtonsoft.Json;
+
+namespace Database {
+ public static class DetailsHelper {
+ public static async Task<Dictionary<string, string>> GetDetails() {
+ string json = string.Join('\n', await File.ReadAllLinesAsync("details.json"));
+ return JsonConvert.DeserializeObject<Dictionary<string, string>>(json);
+ }
+ }
+} \ No newline at end of file