Informationen ausgelagert Kleines Spy/Test Programm erstellt Mehr Exceptions/InvalidUpdateFileRequestException.cs Launcher Host in Download Server geändert Download Server macht zusätzlich Abfrage an den Hauptserver Download geht jetzt stückweise von statten
64 lines
2.5 KiB
C#
64 lines
2.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Configuration;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BeWo.Service.ServiceUtils.Paths
|
|
{
|
|
public static class ServerFilePaths
|
|
{
|
|
// UpdateRootPath
|
|
// L specialTenant
|
|
// L tenant#1
|
|
// L exampleData#1
|
|
// L version
|
|
// L 1.0.0.0
|
|
// L _default
|
|
// L exampleData#2
|
|
// L tenant#1
|
|
// L exampleData#3
|
|
// L 1.0.0.1
|
|
// L _default
|
|
// L exampleData#4
|
|
// L tenant#1
|
|
// L exampleData#5
|
|
// L version.config
|
|
|
|
private static string _DownloadVersionFilePath;
|
|
private static string _DownloadFolderPath;
|
|
private static string _LogFolderPath;
|
|
|
|
public static string DownloadVersionFilePath => GetAppSettings(_DownloadVersionFilePath, "DownloadVersionFilePath");
|
|
public static string DownloadFolderPath => GetAppSettings(_DownloadFolderPath, "DownloadFolderPath");
|
|
public static string LogFolderPath => GetAppSettings(_LogFolderPath, "LogFolderPath");
|
|
|
|
static ServerFilePaths()
|
|
{
|
|
|
|
}
|
|
|
|
public static string GetOverrideTenantFolderPath() => Path.Combine(DownloadFolderPath, "overridetenant");
|
|
public static string GetOverrideTenantFolderPath(string tenant) => Path.Combine(GetOverrideTenantFolderPath(), tenant);
|
|
public static string GetVersionFolderPath() => Path.Combine(DownloadFolderPath, "version");
|
|
|
|
public static string GetVersionFolderPath(string version) => Path.Combine(GetVersionFolderPath(), version);
|
|
public static string GetVersionTenantFolderPath(string version, string tenant) => Path.Combine(GetVersionFolderPath(version), tenant);
|
|
public static string GetVersionDefaultFolderPath(string version) => GetVersionTenantFolderPath(version, "default");
|
|
|
|
public static string GetVersionConfigFilePath() => DownloadVersionFilePath;
|
|
|
|
public static string GetLogFolderPath(string tenant) => Path.Combine(LogFolderPath, tenant);
|
|
|
|
public static string GetAppSettings(string name, string setting)
|
|
{
|
|
if (name is null)
|
|
name = ConfigurationManager.AppSettings.Get(setting);
|
|
|
|
return name;
|
|
}
|
|
}
|
|
}
|