static void Main(string[] args) { TradingFrameworkUtility TFU = new TradingFrameworkUtility(); TFU.prod_write("{0}", Environment.GetCommandLineArgs()[0]); TFU.prod_write("started at: {0}", DateTime.Now); using (TTAPIEvents tt = new TTAPIEvents()) { tt.Start(TFU); } }
/// <summary> /// Create and start the Dispatcher /// </summary> public void Start(TradingFrameworkUtility tfu) { util = tfu; username = Properties.Settings.Default.USER; password = Properties.Settings.Default.PASSWORD; util.dbug_write("user is: {0}", username); // Attach a WorkerDispatcher to the current thread workDispatch = Dispatcher.AttachWorkerDispatcher(); workDispatch.BeginInvoke(new Action(Init)); workDispatch.Run(); }