コード例 #1
0
 private void ProcessLowPriceMember(LowestOfferListingType lowestOfferListing, AsinInputItem asinInputItem)
 {
     lowestOfferListing.WriteSeparatedFragment(StartRange.ToString("yyyy-MM-dd"),
         asinInputItem.Account, asinInputItem.Title, asinInputItem.SellerSku, asinInputItem.AmzRstListPrice, asinInputItem.ListingOpenDate, asinInputItem.Asin,
         _lowPriceCsv, "\t");
 }
コード例 #2
0
        private void LoadAsinList()
        {
            _asinInputList = new List<AsinInputItem>();

            using (StreamReader reader = new StreamReader(@"C:\Users\Rich\Dropbox\Documents\RedSkyTrader\Working Versions\AsinWork\AsinList.txt"))
            {
                var firstline = reader.ReadLine();
                if (firstline != null)
                {
                    string[] firstLineParts = firstline.Split(new[] { '\t' });
                    if (firstLineParts.Length != 6)
                    {
                        throw new ApplicationException("Asin input file incorrect.");
                    }
                }

                while (!reader.EndOfStream)
                {
                    string readLine = reader.ReadLine();
                    if (readLine == null || readLine.StartsWith("#"))
                        continue;

                    string[] lineParts = readLine.Split(new[] { '\t' });
                    if (lineParts.Length != 6)
                    {
                        throw new ApplicationException("Asin input file incorrect.");
                    }

                    AsinInputItem asinInputItem = new AsinInputItem()
                    {
                        Account = lineParts[0],
                        Title = lineParts[1],
                        SellerSku = lineParts[2],
                        AmzRstListPrice = lineParts[3],
                        ListingOpenDate = lineParts[4],
                        Asin = lineParts[5]
                    };

                    _asinInputList.Add(asinInputItem);
                }
            }
        }