protected override ISimulatedDataSource GetDataSource() { ISimulatedDataSource _simulatedDataSource; if (this.UseFile) { var dataSource = new SimulateddataSourceTextFileReverse { FileName = this.FileName }; _simulatedDataSource = dataSource; } else { //TODO: IMPLEMENTARE IL REVERSE SULLE QUERY SQL var dataSource = new SimulateddataSourceSqLite { DeltaTime = this.DeltaTime, StartTime = this.StartTime, EndTime = this.EndTime, Currency = this.Currency }; _simulatedDataSource = dataSource; } return(_simulatedDataSource); }
protected virtual ISimulatedDataSource GetDataSource() { ISimulatedDataSource simulatedDataSource; if (this.UseFile) { if (MainConfiguration.Configuration.MarketSimulatorUseCandleFileReversed) { var dataSource = new SimulateddataSourceTextFileReverse() { FileName = this.FileName }; simulatedDataSource = dataSource; } else { var dataSource = new SimulateddataSourceTextFile() { FileName = this.FileName }; simulatedDataSource = dataSource; } } else if (this.UseMtGox) { var datasource = new SimulateddataSourceMtgox() { }; simulatedDataSource = datasource; } else { var dataSource = new SimulateddataSourceSqLite { SqLiteDeltaTime = this.DeltaTime, StartTime = this.StartTime, EndTime = this.EndTime, Currency = this.Currency }; simulatedDataSource = dataSource; } return(simulatedDataSource); }