From 4e729d1b0a9ca65eaaa8f95eeba216abc68c2447 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 4 Feb 2019 12:19:19 +0000 Subject: Made a function to get details from details.json --- Database/DetailsHelper.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Database/DetailsHelper.cs (limited to 'Database/DetailsHelper.cs') 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> GetDetails() { + string json = string.Join('\n', await File.ReadAllLinesAsync("details.json")); + return JsonConvert.DeserializeObject>(json); + } + } +} \ No newline at end of file -- cgit v1.2.3-13-gbd6f