Esempio n. 1
0
 public Processor(IConfigBusiness configBusiness, ICounterBusiness counterBusiness, ISendBusiness sendBusiness, ITagLoader tagLoader)
 {
     _configBusiness = configBusiness;
     _counterBusiness = counterBusiness;
     _sendBusiness = sendBusiness;
     _tagLoader = tagLoader;
 }
 public CounterCollectCommand(IConfigBusiness configBusiness, ICounterBusiness counterBusiness, ISendBusiness sendBusiness, ITagLoader tagLoader)
     : base("Collect", "Collect counter data and send to the database.")
 {
     _configBusiness = configBusiness;
     _counterBusiness = counterBusiness;
     _sendBusiness = sendBusiness;
     _tagLoader = tagLoader;
 }
Esempio n. 3
0
 public Processor(IConfigBusiness configBusiness, ICounterBusiness counterBusiness, IPublisherBusiness publisherBusiness, ISendBusiness sendBusiness, ITagLoader tagLoader)
 {
     _configBusiness    = configBusiness;
     _counterBusiness   = counterBusiness;
     _sendBusiness      = sendBusiness;
     _tagLoader         = tagLoader;
     _publisherBusiness = publisherBusiness;
 }
 public CounterStartCommand(IConfigBusiness configBusiness, ICounterBusiness counterBusiness, ISendBusiness sendBusiness, ITagLoader tagLoader)
     : base("Start", "Start the counter and run the collector.")
 {
     _configBusiness = configBusiness;
     _counterBusiness = counterBusiness;
     _sendBusiness = sendBusiness;
     _tagLoader = tagLoader;
 }
Esempio n. 5
0
 public PublishStartCommand(IConfigBusiness configBusiness, ICounterBusiness counterBusiness, IPublisherBusiness publisherBusiness, ISendBusiness sendBusiness, ITagLoader tagLoader)
     : base("Start", "Start the publishing of counters.")
 {
     _configBusiness    = configBusiness;
     _counterBusiness   = counterBusiness;
     _publisherBusiness = publisherBusiness;
     _sendBusiness      = sendBusiness;
     _tagLoader         = tagLoader;
 }
Esempio n. 6
0
 public CounterCollectCommand(IConfigBusiness configBusiness, ICounterBusiness counterBusiness, IPublisherBusiness publisherBusiness, ISendBusiness sendBusiness, ITagLoader tagLoader)
     : base("Collect", "Collect counter data and send to the database.")
 {
     _configBusiness    = configBusiness;
     _counterBusiness   = counterBusiness;
     _sendBusiness      = sendBusiness;
     _tagLoader         = tagLoader;
     _publisherBusiness = publisherBusiness;
 }
Esempio n. 7
0
 public CounterStartCommand(IConfigBusiness configBusiness, ICounterBusiness counterBusiness, IPublisherBusiness publisherBusiness, ISendBusiness sendBusiness, ITagLoader tagLoader)
     : base("Start", "Start the counter and run the collector.")
 {
     _configBusiness    = configBusiness;
     _counterBusiness   = counterBusiness;
     _publisherBusiness = publisherBusiness;
     _sendBusiness      = sendBusiness;
     _tagLoader         = tagLoader;
 }
 public PublishStartCommand(IConfigBusiness configBusiness, ICounterBusiness counterBusiness, IPublisherBusiness publisherBusiness, ISendBusiness sendBusiness, ITagLoader tagLoader)
     : base("Start", "Start the publishing of counters.")
 {
     _configBusiness = configBusiness;
     _counterBusiness = counterBusiness;
     _publisherBusiness = publisherBusiness;
     _sendBusiness = sendBusiness;
     _tagLoader = tagLoader;
 }
Esempio n. 9
0
 public CollectorEngine(IPerformanceCounterGroup performanceCounterGroup, ISendBusiness sendBusiness, ITagLoader tagLoader)
 {
     _performanceCounterGroup = performanceCounterGroup;
     _sendBusiness = sendBusiness;
     _tags = tagLoader.GetGlobalTags().Union(_performanceCounterGroup.Tags).ToArray();
     if (performanceCounterGroup.SecondsInterval > 0)
     {
         _timer = new Timer(1000 * performanceCounterGroup.SecondsInterval);
         _timer.Elapsed += Elapsed;
     }
     _name = _performanceCounterGroup.Name;
 }
Esempio n. 10
0
 public DownloadCommand(ILogger <DownloadCommand> logger,
                        IFileScanner fileScanner,
                        IOptions <ToolOptions> options,
                        ITagLoader tagLoader,
                        IEnumerable <ILyricDownloader> lyricDownloaderList,
                        IEnumerable <IAlbumDownloader> albumDownloaderList)
 {
     _logger              = logger;
     _fileScanner         = fileScanner;
     _tagLoader           = tagLoader;
     _lyricDownloaderList = lyricDownloaderList;
     _albumDownloaderList = albumDownloaderList;
     _options             = options.Value;
 }
Esempio n. 11
0
        public PublisherEngine(ICounterPublisher counterPublisher, ISendBusiness sendBusiness, ITagLoader tagLoader)
        {
            _counterPublisher = counterPublisher;
            _sendBusiness = sendBusiness;
            _tags = tagLoader.GetGlobalTags(); //.Union(_performanceCounterGroup.Tags).ToArray();

            if (counterPublisher.SecondsInterval > 0)
            {
                _timer = new Timer(1000 * counterPublisher.SecondsInterval);
                _timer.Elapsed += Elapsed;
            }

            _perfCounter = SetupCategory();
            //_perfCounter = new PerformanceCounter(_counterPublisher.CategoryName, _counterPublisher.CounterName, false) { RawValue = _counterPublisher.GetValue() };
        }
Esempio n. 12
0
        protected CollectorEngineBase(IPerformanceCounterGroup performanceCounterGroup, ISendBusiness sendBusiness, ITagLoader tagLoader, bool metadata)
        {
            _engineName = GetType().Name;
            _performanceCounterGroup = performanceCounterGroup;
            _name = _performanceCounterGroup.Name;
            _sendBusiness = sendBusiness;
            _tags = tagLoader.GetGlobalTags().Union(_performanceCounterGroup.Tags).ToArray();

            if (performanceCounterGroup.SecondsInterval > 0)
            {
                _timer = new Timer(1000 * performanceCounterGroup.SecondsInterval);
                _timer.Elapsed += Elapsed;
            }

            _metadata = metadata;
        }
        protected CollectorEngineBase(IPerformanceCounterGroup performanceCounterGroup, ISendBusiness sendBusiness, ITagLoader tagLoader, bool metadata)
        {
            _engineName = GetType().Name;
            _performanceCounterGroup = performanceCounterGroup;
            _name         = _performanceCounterGroup.Name;
            _sendBusiness = sendBusiness;
            _tags         = tagLoader.GetGlobalTags().Union(_performanceCounterGroup.Tags).ToArray();

            if (performanceCounterGroup.SecondsInterval > 0)
            {
                _timer          = new Timer(1000 * performanceCounterGroup.SecondsInterval);
                _timer.Elapsed += Elapsed;
            }

            _metadata = metadata;
        }
Esempio n. 14
0
 public ExactCollectorEngine(IPerformanceCounterGroup performanceCounterGroup, ISendBusiness sendBusiness, ITagLoader tagLoader, bool metadata)
     : base(performanceCounterGroup, sendBusiness, tagLoader, metadata)
 {
     _metaDataBusiness = new MetaDataBusiness();
 }
 public SafeCollectorEngine(IPerformanceCounterGroup performanceCounterGroup, ISendBusiness sendBusiness, ITagLoader tagLoader, bool metadata)
     : base(performanceCounterGroup, sendBusiness, tagLoader, metadata)
 {
 }
Esempio n. 16
0
 public SafeCollectorEngine(IPerformanceCounterGroup performanceCounterGroup, ISendBusiness sendBusiness, ITagLoader tagLoader, bool metadata)
     : base(performanceCounterGroup, sendBusiness, tagLoader, metadata)
 {
 }
Esempio n. 17
0
        public PublisherEngine(ICounterPublisher counterPublisher, ISendBusiness sendBusiness, ITagLoader tagLoader)
        {
            _counterPublisher = counterPublisher;
            _sendBusiness     = sendBusiness;
            _tags             = tagLoader.GetGlobalTags(); //.Union(_performanceCounterGroup.Tags).ToArray();

            if (counterPublisher.SecondsInterval > 0)
            {
                _timer          = new Timer(1000 * counterPublisher.SecondsInterval);
                _timer.Elapsed += Elapsed;
            }

            _perfCounter = SetupCategory();
            //_perfCounter = new PerformanceCounter(_counterPublisher.CategoryName, _counterPublisher.CounterName, false) { RawValue = _counterPublisher.GetValue() };
        }