code reformat and cleanup
This commit is contained in:
@@ -5,10 +5,10 @@ namespace ParadoxSaveParser.WebAPI;
|
||||
public class Config
|
||||
{
|
||||
public const int ActualVersion = 1;
|
||||
|
||||
public int Version = ActualVersion;
|
||||
public string BaseUrl = "http://127.0.0.1:5226/";
|
||||
|
||||
public int Version = ActualVersion;
|
||||
|
||||
public static Config FromDtsod(DtsodV23 d)
|
||||
{
|
||||
var cfg = new Config
|
||||
@@ -18,16 +18,16 @@ public class Config
|
||||
};
|
||||
if (cfg.Version < ActualVersion)
|
||||
throw new Exception($"config is obsolete (config v{cfg.Version} < program v{ActualVersion})");
|
||||
if(cfg.Version > ActualVersion)
|
||||
if (cfg.Version > ActualVersion)
|
||||
throw new Exception($"program is obsolete (config v{cfg.Version} > program v{ActualVersion})");
|
||||
return cfg;
|
||||
}
|
||||
|
||||
public DtsodV23 ToDtsod() =>
|
||||
new()
|
||||
public DtsodV23 ToDtsod()
|
||||
=> new()
|
||||
{
|
||||
{ "version", Version },
|
||||
{ "baseUrl", BaseUrl },
|
||||
{ "baseUrl", BaseUrl }
|
||||
};
|
||||
|
||||
public override string ToString() => ToDtsod().ToString();
|
||||
|
||||
Reference in New Issue
Block a user