コード例 #1
0
ファイル: Processor.cs プロジェクト: zeugfr/Influx-Capacitor
 public Processor(IConfigBusiness configBusiness, ICounterBusiness counterBusiness, ISendBusiness sendBusiness, ITagLoader tagLoader)
 {
     _configBusiness = configBusiness;
     _counterBusiness = counterBusiness;
     _sendBusiness = sendBusiness;
     _tagLoader = tagLoader;
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 public Processor(IConfigBusiness configBusiness, ICounterBusiness counterBusiness, IPublisherBusiness publisherBusiness, ISendBusiness sendBusiness, ITagLoader tagLoader)
 {
     _configBusiness    = configBusiness;
     _counterBusiness   = counterBusiness;
     _sendBusiness      = sendBusiness;
     _tagLoader         = tagLoader;
     _publisherBusiness = publisherBusiness;
 }
コード例 #4
0
 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;
 }
コード例 #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;
 }
コード例 #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;
 }
コード例 #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;
 }
コード例 #8
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;
 }
コード例 #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;
 }
コード例 #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;
 }
コード例 #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() };
        }
コード例 #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;
        }
コード例 #13
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;
        }
コード例 #14
0
 public ExactCollectorEngine(IPerformanceCounterGroup performanceCounterGroup, ISendBusiness sendBusiness, ITagLoader tagLoader, bool metadata)
     : base(performanceCounterGroup, sendBusiness, tagLoader, metadata)
 {
     _metaDataBusiness = new MetaDataBusiness();
 }
コード例 #15
0
 public SafeCollectorEngine(IPerformanceCounterGroup performanceCounterGroup, ISendBusiness sendBusiness, ITagLoader tagLoader, bool metadata)
     : base(performanceCounterGroup, sendBusiness, tagLoader, metadata)
 {
 }
コード例 #16
0
 public SafeCollectorEngine(IPerformanceCounterGroup performanceCounterGroup, ISendBusiness sendBusiness, ITagLoader tagLoader, bool metadata)
     : base(performanceCounterGroup, sendBusiness, tagLoader, metadata)
 {
 }
コード例 #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() };
        }