+ Login wird verifiziert -> immernoch 5 Sekunden zum Validieren ------ LOG File [#0884 14:38:39]: ----------------------------------- [#0884 14:38:39]: >>> GetUpdatePlan Anfrage <<< [#0884 14:38:39]: ----------------------------------- [#0884 14:38:39]: Validiere Plan Request. [#0884 14:38:39]: Plan Request erfolreich validiert. Verifiziere Login. [#0884 14:38:44]: Login verifiziert. Baue Antwort. [#0884 14:38:45]: Antwort erfolgreich gebaut. [#0884 14:38:45]: ----------------------------------- [#3067 14:38:49]: ----------------------------------- [#3067 14:38:49]: >>> GetUpdateFile Anfrage <<< [#3067 14:38:49]: ----------------------------------- [#3067 14:38:49]: Validiere File Request. [#3067 14:38:49]: Plan Request erfolreich validiert. [#3067 14:38:49]: --> File: BeWoPlaner.application [#3067 14:38:49]: Verifiziere Login. [#3067 14:38:54]: Login verifiziert. Baue Antwort. [#3067 14:38:54]: Antwort erfolgreich gebaut. [#3067 14:38:54]: ----------------------------------- [#0952 14:38:54]: ----------------------------------- [#0952 14:38:54]: >>> GetUpdateFile Anfrage <<< [#0952 14:38:54]: ----------------------------------- [#0952 14:38:54]: Validiere File Request. [#0952 14:38:54]: Plan Request erfolreich validiert. [#0952 14:38:54]: --> File: BeWoPlaner.exe [#0952 14:38:54]: Verifiziere Login. [#0952 14:38:59]: Login verifiziert. Baue Antwort. [#0952 14:38:59]: Antwort erfolgreich gebaut. [#0952 14:38:59]: ----------------------------------- [#8596 14:39:00]: ----------------------------------- [#8596 14:39:00]: >>> GetUpdateFile Anfrage <<< [#8596 14:39:00]: ----------------------------------- [#8596 14:39:00]: Validiere File Request. [#8596 14:39:00]: Plan Request erfolreich validiert. [#8596 14:39:00]: --> File: BeWoPlaner.exe.config [#8596 14:39:00]: Verifiziere Login. [#8596 14:39:05]: Login verifiziert. Baue Antwort. [#8596 14:39:05]: Antwort erfolgreich gebaut. [#8596 14:39:05]: ----------------------------------- [#8990 14:39:05]: ----------------------------------- [#8990 14:39:05]: >>> GetUpdateFile Anfrage <<< [#8990 14:39:05]: ----------------------------------- [#8990 14:39:05]: Validiere File Request. [#8990 14:39:05]: Plan Request erfolreich validiert. [#8990 14:39:05]: --> File: BeWoPlaner.exe.manifest [#8990 14:39:05]: Verifiziere Login. [#8990 14:39:10]: Login verifiziert. Baue Antwort. [#8990 14:39:10]: Antwort erfolgreich gebaut. [#8990 14:39:10]: ----------------------------------- [#4160 14:39:10]: ----------------------------------- [#4160 14:39:10]: >>> GetUpdateFile Anfrage <<< [#4160 14:39:10]: ----------------------------------- [#4160 14:39:10]: Validiere File Request. [#4160 14:39:10]: Plan Request erfolreich validiert. [#4160 14:39:10]: --> File: BeWoPlaner.pdb [#4160 14:39:10]: Verifiziere Login. [#4160 14:39:15]: Login verifiziert. Baue Antwort. [#4160 14:39:15]: Antwort erfolgreich gebaut. [#4160 14:39:15]: ----------------------------------- [#2569 14:39:15]: ----------------------------------- [#2569 14:39:15]: >>> GetUpdateFile Anfrage <<< [#2569 14:39:15]: ----------------------------------- [#2569 14:39:15]: Validiere File Request. [#2569 14:39:15]: Plan Request erfolreich validiert. [#2569 14:39:15]: --> File: Blacklight.Wpf.Controls.dll [#2569 14:39:15]: Verifiziere Login. [#2569 14:39:20]: Login verifiziert. Baue Antwort. [#2569 14:39:20]: Antwort erfolgreich gebaut. [#2569 14:39:20]: ----------------------------------- [#2962 14:39:20]: ----------------------------------- [#2962 14:39:20]: >>> GetUpdateFile Anfrage <<< [#2962 14:39:20]: ----------------------------------- [#2962 14:39:20]: Validiere File Request. [#2962 14:39:20]: Plan Request erfolreich validiert. [#2962 14:39:20]: --> File: BS.Shared.dll [#2962 14:39:20]: Verifiziere Login. [#2962 14:39:25]: Login verifiziert. Baue Antwort. [#2962 14:39:25]: Antwort erfolgreich gebaut. [#2962 14:39:25]: ----------------------------------- [#8131 14:39:25]: ----------------------------------- [#8131 14:39:25]: >>> GetUpdateFile Anfrage <<< [#8131 14:39:25]: ----------------------------------- [#8131 14:39:25]: Validiere File Request. [#8131 14:39:25]: Plan Request erfolreich validiert. [#8131 14:39:25]: --> File: BS.Shared.pdb [#8131 14:39:25]: Verifiziere Login. [#8131 14:39:30]: Login verifiziert. Baue Antwort. [#8131 14:39:30]: Antwort erfolgreich gebaut. [#8131 14:39:30]: ----------------------------------- [#2429 14:39:30]: ----------------------------------- [#2429 14:39:30]: >>> GetUpdateFile Anfrage <<< [#2429 14:39:30]: ----------------------------------- [#2429 14:39:30]: Validiere File Request. [#2429 14:39:30]: Plan Request erfolreich validiert. [#2429 14:39:30]: --> File: BS.SharedLauncher.dll [#2429 14:39:30]: Verifiziere Login. [#2429 14:39:35]: Login verifiziert. Baue Antwort. [#2429 14:39:35]: Antwort erfolgreich gebaut. [#2429 14:39:35]: -----------------------------------
71 lines
2.3 KiB
C#
71 lines
2.3 KiB
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 UpdateFileRequest _Request;
|
|
private static UpdateFileResponse _Response;
|
|
|
|
public static void BuildResponse(UpdateFileRequest request, string tenant, UpdateFileResponse response)
|
|
{
|
|
_Response = response;
|
|
_Tenant = tenant;
|
|
_Request = request;
|
|
_Version = request.Version;
|
|
|
|
calculate();
|
|
}
|
|
|
|
private static void calculate()
|
|
{
|
|
var path = Path.Combine(getSourceFolderPath(), _Request.UpdateFile.RelativePath);
|
|
|
|
_Response.FileData = File.ReadAllBytes(path);
|
|
}
|
|
|
|
private static string getSourceFolderPath()
|
|
{
|
|
switch (_Request.UpdateFile.Source)
|
|
{
|
|
case BS.SharedLauncher.Enums.UpdateFileSource.Invalid:
|
|
throw new UpdateException("Invalid UpdateFileSource");
|
|
|
|
case BS.SharedLauncher.Enums.UpdateFileSource.VersionDefault:
|
|
return ServerFilePaths.GetVersionDefaultFolderPath(_Version);
|
|
|
|
case BS.SharedLauncher.Enums.UpdateFileSource.VersionTenant:
|
|
return ServerFilePaths.GetVersionTenantFolderPath(_Version, _Tenant);
|
|
|
|
case BS.SharedLauncher.Enums.UpdateFileSource.VersionUser:
|
|
break;
|
|
|
|
case BS.SharedLauncher.Enums.UpdateFileSource.OverrideTenant:
|
|
return ServerFilePaths.GetSpecialTenantFolderPath(_Tenant);
|
|
|
|
case BS.SharedLauncher.Enums.UpdateFileSource.OverrideUser:
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
|
|
// User bekommt eigene Daten Feature
|
|
throw new NotImplementedException("#479839129");
|
|
}
|
|
}
|
|
}
|