private void ProcessETFList(string path, string fileName, string[] columnNames) { var fileToUse = path + fileName; loadFileToDb.FileName = fileToUse; loadFileToDb.Columns = columnNames; loadFileToDb.Delimiter = delimiter; loadFileToDb.IsETF = isETF; loadFileToDb.IsMutaulFund = isMutualFund; //loadFileToDb.ParseCompanyDetailsFile(); //loadFileToDb.SaveRecordsToDb(_repository); loadFileToDb.ParseSecurityListingFile(); }
public void ParseFileTest() { var fileName = @"symboldirectory/nasdaqlisted.txt"; var temppath = Path.GetTempPath(); fileName = temppath + fileName; string[] columnNames = { "Symbol", "Security Name" }; var lftdb = new LoadFileToDb(fileName, columnNames); var loadResult = lftdb.ParseSecurityListingFile(); Assert.IsTrue(loadResult); }
private LoadFileToDb PrepareCompanyDetailsList(string[] columnNames, ref string fileName, string delimiter = "|") { var temppath = Path.GetTempPath(); fileName = temppath + fileName; var lftdb = new LoadFileToDb(fileName, columnNames) { Delimiter = delimiter, IsETF = isETF, IsMutaulFund = isMutalFund }; var loadResult = lftdb.ParseSecurityListingFile(); return(lftdb); }