38 lines
1015 B
C#
38 lines
1015 B
C#
using BeWo.Service.ServiceUtils.Paths;
|
|
using BS.SharedLauncher.DataContract;
|
|
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 UpdateFileResponseBuilder
|
|
{
|
|
private static string _Version;
|
|
private static string _Tenant;
|
|
|
|
private static UpdateFileResponse _Response;
|
|
|
|
public static void BuildResponse(UpdateFileRequest request, string tenant, UpdateFileResponse response)
|
|
{
|
|
_Response = response;
|
|
_Tenant = tenant;
|
|
_Version = request.Version;
|
|
|
|
calculate(request.UpdateFile.AbsolutePath);
|
|
}
|
|
|
|
private static void calculate(string path)
|
|
{
|
|
_Response.FileData = File.ReadAllBytes(path);
|
|
}
|
|
}
|
|
}
|