public void SetUp() { this.stServerSingleton = new StServerMockSingleton(); this.stServer = this.stServerSingleton.Instance; this.handlers = new SmartComHandlersDatabase(); this.binder = new SmartComBinder(this.stServerSingleton.Instance, this.handlers, new NullLogger()); }
public SmartComAdapter(IConnector connector, SmartComHandlersDatabase handlers, IBinder binder, ISubscriber subscriber, IGenericSingleton <StServer> stServerSingleton, ILogger logger, int monitorTimeoutSeconds = 20) { this.stServerSingleton = stServerSingleton; this.stServer = this.stServerSingleton.Instance; this.handlers = handlers; this.binder = binder; this.subscriber = subscriber; this.logger = logger; this.connector = connector; this.monitorTimeoutSeconds = monitorTimeoutSeconds; this.defaultAdapterHandlers = new AdapterHandlers(); this.seconds = AppSettings.GetValue <int>("SecondsBetweenConnectionAwaitingAttempts"); this.handlers.Add <_IStClient_ConnectedEventHandler>(SmartComTraderConnected); this.handlers.Add <_IStClient_DisconnectedEventHandler>(SmartComTraderDisconnected); this.dataFlowMonitorTimer = new Timer(MonitorDataFlow, null, this.monitorTimeoutSeconds * 1000, 1000 * this.seconds); this.connectionMonitorTimer = new Timer(MonitorConnection, null, this.monitorTimeoutSeconds * 1000, 1000 * this.seconds); }
public GetBarsCommand(string symbol, int barIntervalSeconds, int barQuantity, IGenericSingleton <StServer> stServerSingleton, ILogger logger) { this.symbol = symbol; this.barIntervalSeconds = barIntervalSeconds; this.barQuantity = barQuantity; this.stServerSingleton = stServerSingleton; this.logger = logger; }
private Singleton() { IGSR = this; IGSU = this; IGSP = this; IGSG = this; IGSA = this; IGSPR = this; IGSPI = this; IC = this; }
public void Setup() { this.rawTradingDataContext = new RawTradingDataContext(); this.stServerSingleton = new StServerMockSingleton(); this.handlers = new SmartComHandlersDatabase(); this.binder = new SmartComBinder(this.stServerSingleton.Instance, this.handlers, new NullLogger()); this.provider = new RawTradingDataProvider(this.handlers, this.rawTradingDataContext, new NullLogger()); this.binder.Bind(); this.stServer = (StServerClassMock)this.stServerSingleton.Instance; }
public GetSymbolsCommand(IGenericSingleton <StServer> singleton, ILogger logger) { this.singleton = singleton; this.logger = logger; }
public SmartComOrderManager(IGenericSingleton <StServer> singleton, BaseDataContext rawData, ILogger logger) { this.singleton = singleton; this.rawData = rawData; this.logger = logger; }