Zwischenstand:

- Download Req und Res eingeführt
- Version XML + version.config
This commit is contained in:
rene
2022-03-09 16:29:00 +01:00
parent bae1380d45
commit 25438ebd2d
30 changed files with 922 additions and 304 deletions

View File

@@ -0,0 +1,43 @@
using BS.SharedLauncher.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
namespace BeWo.Service.ServiceUtils.Update
{
public class UpdateConfigHelper
{
public XmlDocument Document{ get; set; }
public string Tenant { get; set; }
public UpdateConfigHelper(string configFile, string tenant)
{
Document = new XmlDocument();
Document.Load(configFile);
Tenant = tenant;
}
//public PlanerUpdateSource Source => GotSpecialVersion ? PlanerUpdateSource.SpecialVersion : PlanerUpdateSource.NewestVersion;
public string LoadSpecificVersion()
{
try
{
return Document.SelectSingleNode($"/config/tenant[@id='{Tenant}']/version").InnerXml;
}
catch (Exception)
{
return null;
}
}
public string LoadDefaultVersion()
{
return Document.SelectSingleNode("/config/default/version").InnerXml;
}
}
}