Porting the old instance complete. Added DD necessities

This commit is contained in:
Cyberboss
2017-10-26 14:01:28 -04:00
parent d769212f95
commit 26bf35bc4b
15 changed files with 234 additions and 109 deletions
+3 -2
View File
@@ -16,7 +16,6 @@ namespace TGServerService
public string InstanceDirectory { get; private set; }
public ulong Version { get; protected set; } = CurrentVersion;
public Guid ID { get; private set; } = Guid.NewGuid();
public string Name { get; set; } = "TG Station Server";
public bool Enabled { get; set; } = true;
@@ -55,7 +54,9 @@ namespace TGServerService
public void Save()
{
File.WriteAllText(Path.Combine(InstanceDirectory, JSONFilename), new JavaScriptSerializer().Serialize(this));
var data = new JavaScriptSerializer().Serialize(this);
var path = Path.Combine(InstanceDirectory, JSONFilename);
File.WriteAllText(path, data);
}
public static InstanceConfig Load(string path)