コード例 #1
0
        private TheirClickAndImpressionData ConvertCellsToTheirData(int row, Dictionary <int, Dictionary <int, SLCell> > cells, List <SLRstType> sharedStrings)
        {
            var result = new TheirClickAndImpressionData();

            result.IndexString = ConvertCellToString(cells[row][1], sharedStrings);
            result.Clicks      = ConvertCellToInt(cells[row][2]);
            result.Impressions = ConvertCellToInt(cells[row][3]);
            result.DateStamp   = ConvertCellToDateTime(cells[row][4]);

            return(result);
        }
コード例 #2
0
        /// <summary>
        /// This will return a TheirData concrete implementation with Clicks and Impressions
        /// </summary>
        /// <param name="lineElements">The parts of the line in a list</param>
        /// <returns>TheirClickAndImpressionData</returns>
        public override TheirData ReadLine(List <string> lineElements)
        {
            var theirData = new TheirClickAndImpressionData();

            // Convert this string to Upper so that searching can be completed
            // with a known case and to remove some of the inconsistency in the
            // data we take in
            theirData.IndexString = lineElements[0].ToUpper();
            theirData.Clicks      = Int32.Parse(lineElements[1]);
            theirData.Impressions = Int32.Parse(lineElements[2]);
            theirData.DateStamp   = DateTime.FromOADate(Int32.Parse(lineElements[3]));

            return(theirData);
        }