/// <summary> /// Reads required connections pamareters from stored file /// </summary> private void ReadConnectionParameters() { // Read parameters from given file var parameters = ParameterReader.ReadParamters("FxcmParams.xml", "Fxcm"); if (parameters.Count == 5) { string loginId; parameters.TryGetValue("Login", out loginId); string password; parameters.TryGetValue("Password", out password); string account; parameters.TryGetValue("Account", out account); string connection; parameters.TryGetValue("Connection", out connection); string url; parameters.TryGetValue("Url", out url); // Create new object _connectionParameters = new ConnectionParameters(loginId, password, account, connection, url); return; } _connectionParameters = null; }
/// <summary> /// Reads required connections pamareters from stored file /// </summary> private void ReadConnectionParameters() { // Read parameters from given file var parameters = ParameterReader.ReadParamters("IqFeedParams.xml", "IqFeed"); if (parameters.Count == 4) { string loginId; parameters.TryGetValue("LoginID", out loginId); string password; parameters.TryGetValue("Password", out password); string productionId; parameters.TryGetValue("ProductID", out productionId); string productVersion; parameters.TryGetValue("ProductVersion", out productVersion); // Create new object _connectionParameters = new ConnectionParameters(loginId, password, productionId, productVersion); return; } _connectionParameters = null; }