Files
BeWoPlaner/Service/ServiceUtils/Update/UpdateFileResponseHelper.cs

41 lines
1.1 KiB
C#
Raw Normal View History

using BeWo.Service.ServiceUtils.Paths;
using BS.SharedLauncher.DataContract;
using BS.SharedLauncher.Enums;
using BS.SharedLauncher.Exceptions;
using BS.SharedLauncher.Extensions;
using BS.SharedLauncher.Logic;
using BS.SharedLauncher.Update;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeWo.Service.ServiceUtils.Update
{
public static class UpdateFileResponseHelper
{
private static string _Version;
private static string _Tenant;
private static UpdateFileResponse _Response;
public static UpdateFileResponse GetUpdateFileResponse(UpdateFileRequest request, string tenant)
{
_Response = new UpdateFileResponse();
_Tenant = tenant;
_Version = request.Version;
calculate(request.UpdateFile.AbsolutePath);
return _Response;
}
private static void calculate(string path)
{
_Response.FileData = File.ReadAllBytes(path);
}
}
}