Open veng1 opened 4 years ago
but whats the problem of using env variables?
@veng1 but look, I've understood your point. Basically, if you've saved already your credentials into IQFeed, there's no reason for throwing an error when launching the IQFeedLaucher isnt it. The problem is that your code is only windows compatible...
@mathpaquette I'm not advocating one way on the other, but conditional logic around what's returned from Environment.OSVersion could skirt this concern.
@hunterfries I totally agree with you. at the end of the day, we need to start IQConnect without parameters if I understand correctly.
I'm not too fond of putting my IQfeed login and password in code like appconfig nor do I want to add it to the environment. It seems easier to use what IQFeed already stores in the Registry. Also the Product ID can be stored there. The following replacement for IQFeedLauncher.cs
using System; using System.Configuration; using System.Diagnostics; using System.Threading; using IQFeed.CSharpApiClient.Extensions; using IQFeed.CSharpApiClient.Socket; using IQFeed.CSharpApiClient.Streaming.Admin; using IQFeed.CSharpApiClient.Streaming.Admin.Messages; using Microsoft.Win32;
namespace IQFeed.CSharpApiClient { // ReSharper disable once InconsistentNaming public static class IQFeedLauncher { public static void Start(string login = null, string password = null, string productId = null, string productVersion = null, int connectionTimeoutMs = 100, int retry = 50) { var appSettings = ConfigurationManager.AppSettings;
}