Exemple #1
0
        public void DoGathering(ServiceReporter.SubjectEntry subj)
        {
            try
            {
                if (this.IsInitialized)
                {
                    Log <ServiceReporter> .Logger.InfoFormat("DoGathering() : {0}", subj.SubjName);

                    subj.DoGathering();
                }
            }
            catch (Exception ex)
            {
                Log <ServiceReporter> .Logger.Error(ex.Message);
            }
        }
Exemple #2
0
        public bool AddSubject(string subject, string[] cols, int interval)
        {
            Log <ServiceReporter> .Logger.InfoFormat("ServiceReporter.AddSubject() : Sub={0}, Interval={1}", subject, interval);

            foreach (ServiceReporter.SubjectEntry subjectEntry in this.Subjects)
            {
                if (subjectEntry.SubjName == subject)
                {
                    return(false);
                }
            }
            ServiceReporter.SubjectEntry subjectEntry2 = new ServiceReporter.SubjectEntry();
            subjectEntry2.SubjName          = subject;
            subjectEntry2.Cols              = cols;
            subjectEntry2.GatheringInterval = interval;
            subjectEntry2.StatHistory       = new List <ServiceReporter.SubjectStat>();
            this.Subjects.Add(subjectEntry2);
            return(true);
        }