2020-08-10 09:22:33 +02:00
|
|
|
|
using System.Threading.Tasks;
|
2020-08-08 08:53:35 +02:00
|
|
|
|
|
2020-08-10 09:22:33 +02:00
|
|
|
|
namespace Giants.Services
|
|
|
|
|
{
|
|
|
|
|
public class UpdaterService : IUpdaterService
|
2020-08-08 08:53:35 +02:00
|
|
|
|
{
|
|
|
|
|
private readonly IUpdaterStore updaterStore;
|
|
|
|
|
|
|
|
|
|
public UpdaterService(IUpdaterStore updaterStore)
|
|
|
|
|
{
|
|
|
|
|
this.updaterStore = updaterStore;
|
|
|
|
|
}
|
2020-08-10 09:22:33 +02:00
|
|
|
|
|
2020-08-11 10:29:45 +02:00
|
|
|
|
public async Task<VersionInfo> GetVersionInfo(string appName)
|
2020-08-10 09:22:33 +02:00
|
|
|
|
{
|
2020-08-11 10:29:45 +02:00
|
|
|
|
ArgumentUtility.CheckStringForNullOrEmpty(appName, nameof(appName));
|
2020-08-10 09:22:33 +02:00
|
|
|
|
|
2020-08-11 10:29:45 +02:00
|
|
|
|
return await this.updaterStore.GetVersionInfo(appName);
|
2020-08-10 09:22:33 +02:00
|
|
|
|
}
|
2020-08-08 08:53:35 +02:00
|
|
|
|
}
|
|
|
|
|
}
|