DutyContent/Updater.cs
Jaehyuk-Lee 5228a2eb6c
add an updater (#9)
* add an updator

* change update branch

* make updater work

* change update branch

* make work

* add new line

* add exception log + clean up
2021-06-10 23:31:15 +09:00

25 lines
628 B
C#

using System;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace DutyContent
{
internal class Updater
{
internal static void CheckNewVersion()
{
Task.Factory.StartNew(() =>
{
try
{
var json = WebApi.Request($"https://raw.githubusercontent.com/kshman/DutyContent/main/Data/DcDuty-{DcContent.Language}.json");
DcContent.Fill(json);
}
catch (Exception ex)
{
MesgLog.Ex(ex, 31);
}
});
}
}
}