private IQuotesDal PrepareQuotesDal() { IQuotesDal dal = new QuotesDAL.QuotesDalCSV(); IQuotesDalInitParams initParams = dal.CreateInitParams(); initParams.Parameters["RootFolder"] = csvRoot; dal.Init(initParams); return(dal); }
IQuotesDal PrepareQuotesDal() { IQuotesDal dal = new QuotesDalMSSQL(); IQuotesDalInitParams initParams = dal.CreateInitParams(); initParams.Parameters["ConnectionStringTimeSeries"] = ConfigurationManager.AppSettings["ConnectionStringMSSQLQuotes"]; dal.Init(initParams); return(dal); }
private void InitDAL() { string dalType = ConfigurationManager.AppSettings["QuotesDalType"]; _dal = _compContainer.GetExport <IQuotesDal>(dalType).Value; IQuotesDalInitParams initParams = _dal.CreateInitParams(); initParams.Parameters["RootFolder"] = Path.Combine(_compContainer.GetExportedValue <string>("ServiceRootFolder"), ConfigurationManager.AppSettings["CSVDalRootFolder"]); initParams.Parameters["ConnectionStringTimeSeries"] = ConfigurationManager.AppSettings["ConnectionStringTimeSeries"]; _dal.Init(initParams); }
private void InitDAL() { _logger.Log(EErrorType.Info, string.Format("InitDAL: Connecting to '{0}'", ConfigurationManager.AppSettings["ConnectionStringTimeSeries"])); Lazy <IQuotesDal> dal = _compContainer.GetExport <IQuotesDal>(ConfigurationManager.AppSettings["DALType"]); IQuotesDalInitParams dalParams = dal.Value.CreateInitParams(); dalParams.Parameters.Add("ConnectionStringTimeSeries", ConfigurationManager.AppSettings["ConnectionStringTimeSeries"]); dal.Value.Init(dalParams); _dal = dal.Value; }
public void Init(IQuotesDalInitParams initParams) { _rootFolder = initParams.Parameters["RootFolder"]; }
public void Init(IQuotesDalInitParams initParams) { _dalParams = initParams; }