/// <summary> /// Starts connecting to the Bitcoin-qt server /// </summary> public BaseBtcConnector(BaseConnectorConfig config) { if (config.isPrimary) { _baseConnector = new Primary(config); } else { _baseConnector = new Secondary(config); } }
public Primary(BaseConnectorConfig config) { if (String.IsNullOrEmpty(config.serverIp)) { throw new ArgumentException("You have to add a server IP setting with key: ServerIp"); } if (String.IsNullOrEmpty(config.username)) { throw new ArgumentException("You have to add a bitcoin qt username setting with key: Username"); } if (String.IsNullOrEmpty(config.password)) { throw new ArgumentException("You have to add a bitcoin qt password setting with key: Password"); } _primaryserverIp = config.serverIp; _primaryusername = config.username; _primarypassword = config.password; }