Created
February 18, 2018 07:54
-
-
Save mczachurski/8fa8f3c864a0a36dd4c59f2969be9d34 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import Configuration | |
public class Configuration { | |
public var serverName: String | |
public var serverPort: Int | |
public var logFile: String | |
public var databaseHost: String | |
public var datanaseName: String | |
public var databaseUser: String | |
public var databasePassword: String | |
init(manager: ConfigurationManager) { | |
self.serverName = manager["serverName"] as? String ?? "" | |
self.serverPort = manager["serverPort"] as? Int ?? 0 | |
self.logFile = manager["logFile"] as? String ?? "" | |
self.databaseHost = manager["databaseHost"] as? String ?? "" | |
self.datanaseName = manager["datanaseName"] as? String ?? "" | |
self.databaseUser = manager["databaseUser"] as? String ?? "" | |
self.databasePassword = manager["databasePassword"] as? String ?? "" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment