Ejemplo n.º 1
0
        private void AddStat(string countryCode, string newsTitle, double deltaIndex, bool indexFollowByNews, DateTime time)
        {
            var newsStat = robotNewsStats.FirstOrDefault(rns => rns.CountryCode == countryCode && rns.Title == newsTitle);

            if (newsStat == null)
            {
                newsStat = new RobotNewsStat {
                    CountryCode = countryCode, Title = newsTitle
                };
                robotNewsStats.Add(newsStat);
            }
            newsStat.DeltaIndexes.Add(deltaIndex);
            newsStat.IndexFollowByNewsFlags.Add(indexFollowByNews);
            newsStat.Times.Add(time);
            AddPendingMessage(string.Format("ProgressForm::AddStat: {2}\t{3}\t{4}\t[{0}] {1}",
                                            countryCode, newsTitle, deltaIndex, indexFollowByNews, time));
        }
Ejemplo n.º 2
0
 private void AddStat(string countryCode, string newsTitle, double deltaIndex, bool indexFollowByNews, DateTime time)
 {
     var newsStat = robotNewsStats.FirstOrDefault(rns => rns.CountryCode == countryCode && rns.Title == newsTitle);
     if (newsStat == null)
     {
         newsStat = new RobotNewsStat { CountryCode = countryCode, Title = newsTitle };
         robotNewsStats.Add(newsStat);
     }
     newsStat.DeltaIndexes.Add(deltaIndex);
     newsStat.IndexFollowByNewsFlags.Add(indexFollowByNews);
     newsStat.Times.Add(time);
     AddPendingMessage(string.Format("ProgressForm::AddStat: {2}\t{3}\t{4}\t[{0}] {1}",
                                     countryCode, newsTitle, deltaIndex, indexFollowByNews, time));
 }