コード例 #1
0
        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();
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }