private void BuildSimulator(string keyFramePath, string liveDataFile, string username, string password, string authKeyFile, bool createThread) { //_log.Info("Building live timing simulator..."); IKeyFrame kf = new Simulator.KeyFrame(keyFramePath); IAuthKey ak; if (string.IsNullOrEmpty(username) || string.IsNullOrEmpty(password)) { ak = new AuthorizationKey(authKeyFile); } else { // We can still use this in the sim, albeit a bit cheeky :) ak = new Protocol.AuthorizationKey(username, password); } _handler = new MessageDispatcherImpl(this); MemoryStream memStream = new MemoryStream(MEMSTREAM_SIZE); _runtime = new Runtime.Runtime(memStream, ak, kf, _handler); // Create network component that drives the Runtime with data. CreateDriver(liveDataFile, kf, memStream); if (createThread) { //_log.Info("Creating child thread to Run simulator"); Start(); } }
private void BuildSimulator(string keyFramePath, string liveDataFile, string username, string password, string authKeyFile, bool createThread) { //_log.Info("Building live timing simulator..."); IKeyFrame kf = new Simulator.KeyFrame(keyFramePath); IAuthKey ak; if( string.IsNullOrEmpty(username) || string.IsNullOrEmpty(password) ) { ak = new AuthorizationKey(authKeyFile); } else { // We can still use this in the sim, albeit a bit cheeky :) ak = new Protocol.AuthorizationKey(username, password); } _handler = new MessageDispatcherImpl(this); MemoryStream memStream = new MemoryStream(MEMSTREAM_SIZE); _runtime = new Runtime.Runtime(memStream, ak, kf, _handler); // Create network component that drives the Runtime with data. CreateDriver(liveDataFile, kf, memStream); if (createThread) { //_log.Info("Creating child thread to Run simulator"); Start(); } }