public ServerProperties(string source) { try { ServerProperties temp = JsonConvert.DeserializeObject <ServerProperties>(File.ReadAllText(source)); clientLocation = temp.clientLocation; } catch (Exception exc) { Logger.Error("Could not read server properties: ", exc); } }
private void ReadProperties() { //Read properties properties = new ServerProperties(serverLocation + "/properties.json"); //Check if the client location is valid if (!Directory.Exists(ClientLocation)) { Logger.Error( "The client location \"" + ClientLocation + "\" is invalid! " + "Please make sure the client location in the server properties file is valid." ); } }