示例#1
0
            public void RecordTopics(TrackTopicsEvent e)
            {
                this.topicEvents.Add(Tuple.Create(this.timeSource.Now, e));
                this.IsDirty = true;

                var topics   = String.Join(",", e.Topics.Select(x => x.Topic + FormatVisibility(x)));
                var lineText = DateTime.Now.ToString() + $" ({this.Code}/{this.ip}): {e.Url}/{e.Detail} {topics}";

                TrackingService.AppendLog(lineText);
            }
示例#2
0
            private TopicReport GetTopicReport(TrackTopicsEvent topicCollection, TrackTopic topicEvent)
            {
                var key = topicEvent.Topic + "#" + topicCollection.Detail + "#" + topicCollection.Url;

                if (!topicDictionary.TryGetValue(key, out var topicReport))
                {
                    topicReport = new TopicReport(topicEvent.Topic, topicCollection.Detail, topicCollection.Url);
                    topicReport.LastVisibleGeneration = Int32.MinValue;
                    topicDictionary[key] = topicReport;
                }

                return(topicReport);
            }