convert to c#
This commit is contained in:
16
ModpackUpdater.Model/ModpackConfig.cs
Normal file
16
ModpackUpdater.Model/ModpackConfig.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace ModpackUpdater.Model;
|
||||
|
||||
public class ModpackConfig
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string UpdateUrl { get; set; }
|
||||
public string InstallUrl { get; set; }
|
||||
|
||||
public static object LoadFromUrl(string url)
|
||||
{
|
||||
string result = new HttpClient().GetStringAsync(url).Result;
|
||||
return JsonConvert.DeserializeObject<ModpackConfig>(result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user