LANCommander/LANCommander.Client/Services/SaveService.cs

36 lines
933 B
C#
Raw Normal View History

using LANCommander.Client.Data.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LANCommander.Client.Services
{
public class SaveService
{
private readonly SDK.Client Client;
public SaveService(SDK.Client client)
{
Client = client;
}
2024-07-15 19:13:40 -05:00
public async Task DownloadLatestAsync(string installDirectory, Guid gameId)
{
await Task.Run(() => Client.Saves.Download(installDirectory, gameId));
}
public async Task DownloadLatest(string installDirectory, Guid gameId)
{
2024-07-15 19:13:40 -05:00
await Task.Run(() => Client.Saves.Download(installDirectory, gameId));
}
public async Task UploadAsync(string installDirectory, Guid gameId)
{
await Task.Run(() => Client.Saves.Upload(installDirectory, gameId));
}
}
}