Exemplo n.º 1
0
        public RamMetricJob(IServiceProvider provider)
        {
            _provider   = provider;
            _repository = _provider.GetService <IRamMetricsRepository>();

            _counter = new PerformanceCounter(categoryName, counterName);
        }
Exemplo n.º 2
0
 public RamMetricsController(IRamMetricsRepository repository, IMetricsAgentClient metricsAgentClient, IMapper mapper, ILogger <RamMetricsController> logger)
 {
     _repository         = repository;
     _mapper             = mapper;
     _metricsAgentClient = metricsAgentClient;
     _logger             = logger;
 }
Exemplo n.º 3
0
 public RamMetricJob(IServiceProvider provider)
 {
     _provider           = provider;
     _repositoryRam      = _provider.GetService <IRamMetricsRepository>();
     _repositoryAgent    = _provider.GetService <IAgentsRepository>();
     _metricsAgentClient = _provider.GetService <IMetricsAgentClient>();
 }
Exemplo n.º 4
0
 public RamMetricsController(IRamMetricsRepository repository, ILogger <RamMetricsController> logger, IMapper mapper)
 {
     this.repository = repository;
     this.logger     = logger;
     this.mapper     = mapper;
     logger.LogDebug(1, "NLog встроен в RamMetricsController");
 }
Exemplo n.º 5
0
        public RamMetricJob(IRamMetricsRepository repository, ILogger <RamMetricJob> logger)
        {
            _repository = repository;
            _logger     = logger;

            _ramCounter = new PerformanceCounter("Memory", "available mbytes");
        }
Exemplo n.º 6
0
 public RamMetricsController(ILogger <RamMetricsController> logger, IRamMetricsRepository repository, IMapper mapper)
 {
     _logger = logger;
     _logger.LogDebug(1, "NLog встроен в RamMetricsController");
     _repository = repository;
     _mapper     = mapper;
 }
Exemplo n.º 7
0
 public RamMetricsController(ILogger <RamMetricsController> logger, IRamMetricsRepository repository, IMapper mapper)
 {
     _logger = logger;
     _logger.LogDebug("Вызов конструктора");
     _repository = repository;
     _mapper     = mapper;
 }
Exemplo n.º 8
0
        public RamMetricsAgentController(ILogger <RamMetricsAgentController> logger, IRamMetricsRepository repository, IMapper mapper)
        {
            _logger = logger;
            _logger.LogDebug(1, $"NLog встроен в {GetType()}");

            _repository = repository;
            _mapper     = mapper;
        }
        public RamMetricsController(ILogger <RamMetricsController> logger, IRamMetricsRepository repository, IMapper mapper)
        {
            _repository = repository;
            _logger     = logger;
            _mapper     = mapper;

            _logger.LogInformation("NLog встроен в RamMetricsController");
        }
Exemplo n.º 10
0
        public RamMetricJob(IRamMetricsRepository repository, IMetricsAgentClient metricsAgentClient, IAgentsRepositorySingle repositoryAgents)
        {
            _repository = repository;

            _metricsAgentClient = metricsAgentClient;

            _repositoryAgents = repositoryAgents;
        }
Exemplo n.º 11
0
 public AgentsRepository(IDataConnector connector, ICPUMetricsRepository cpuMetricsRepository, IDotNetMetricsRepository dotNetMetricsRepository, IHddMetricsRepository hddMetricsRepository, INetworkMetricsRepository networkMetricsRepository, IRamMetricsRepository ramMetricsRepository)
 {
     _connector                = connector;
     _cpuMetricsRepository     = cpuMetricsRepository;
     _dotNetMetricsRepository  = dotNetMetricsRepository;
     _hddMetricsRepository     = hddMetricsRepository;
     _networkMetricsRepository = networkMetricsRepository;
     _ramMetricsRepository     = ramMetricsRepository;
 }
Exemplo n.º 12
0
 public RamMetricJob(IServiceProvider provider, IMapper mapper, IMetricsManagerClient client, ILogger <RamMetricJob> logger)
 {
     _provider         = provider;
     _repository       = _provider.GetService <IRamMetricsRepository>();
     _agentsRepository = _provider.GetService <IAgentsRepository>();
     _mapper           = mapper;
     _client           = client;
     _logger           = logger;
 }
Exemplo n.º 13
0
 public RamMetricsJob(IServiceProvider provider)
 {
     _provider = provider;
     using (var serviceScope = _provider.GetRequiredService <IServiceScopeFactory>().CreateScope())
     {
         _repository = serviceScope.ServiceProvider.GetService <IRamMetricsRepository>();
     }
     _counter = new PerformanceCounter("Memory", "Available MBytes");
 }
Exemplo n.º 14
0
 public RamMetricJob(
     IRamMetricsRepository repository,
     IAgentsRepository <AgentInfo> agentsRepository,
     IMetricsAgentClient client,
     ILogger <RamMetricJob> logger)
 {
     _agentsRepository = agentsRepository;
     _repository       = repository;
     _client           = client;
     _logger           = logger;
 }
Exemplo n.º 15
0
 public RamMetricsController(
     ILogger <RamMetricsController> logger,
     IRamMetricsRepository repository,
     IMapper mapper,
     IConfiguration configuration)
 {
     this._configuration = configuration;
     this._repository    = repository;
     this._logger        = logger;
     this._mapper        = mapper;
     _logger.LogInformation(1, "NLog встроен в RamMetricsController");
 }
Exemplo n.º 16
0
 public RamMetricsJob(IServiceProvider provider, IMapper mapper, IMetricsManagerClient client, ILogger <RamMetricsJob> logger)
 {
     _provider = provider;
     using (var serviceScope = _provider.GetRequiredService <IServiceScopeFactory>().CreateScope())
     {
         _repository       = serviceScope.ServiceProvider.GetService <IRamMetricsRepository>();
         _agentsRepository = serviceScope.ServiceProvider.GetService <IAgentsRepository>();
     }
     _mapper = mapper;
     _client = client;
     _logger = logger;
 }
Exemplo n.º 17
0
 public RamMetricJob(IRamMetricsRepository metricsRepository,
                     IAgentsRepository agentsRepository,
                     ILogger <RamMetricJob> logger,
                     IRamMetricsAgentClient agentClient,
                     IMapper mapper)
 {
     _metricsRepository = metricsRepository;
     _agentsRepository  = agentsRepository;
     _logger            = logger;
     _agentClient       = agentClient;
     _mapper            = mapper;
 }
        public RamMetricsController(
            ILogger <RamMetricsController> logger,
            IRamMetricsRepository repository,
            IAgentsRepository agentRepository,
            IMapper mapper)
        {
            _logger = logger;
            _logger.LogDebug("NLog зарегистрирован в RamMetricsController");

            _repository      = repository;
            _mapper          = mapper;
            _agentRepository = agentRepository;
        }
Exemplo n.º 19
0
 public RamMetricsController(IMapper mapper, IRamMetricsRepository repository, ILogger <RamMetricsController> logger)
 {
     _repository = repository;
     _logger     = logger;
     _mapper     = mapper;
 }
Exemplo n.º 20
0
 public RamMetricJob(IRamMetricsRepository repository, ILogger <RamMetricJob> logger)
 {
     _repository = repository;
     _logger     = logger;
     _ramCounter = new PerformanceCounter("Память CLR .NET", "Байт во всех кучах", "vstest.console");
 }
Exemplo n.º 21
0
 public RamMetricJob(IServiceProvider provider)
 {
     _provider   = provider;
     _repository = _provider.GetService <IRamMetricsRepository>();
     _ramCounter = new PerformanceCounter("Memory", "Available MBytes");
 }
 public RamMetricsController(IRamMetricsRepository repository, ILogger <RamMetricsController> logger)
 {
     this._repository = repository;
     _logger          = logger;
     _logger.LogDebug(1, "NetworkMetricsController");
 }
Exemplo n.º 23
0
 public RamMetricGetByPeriodQueryHandler(IRamMetricsRepository repository, IMapper mapper)
 {
     _repository = repository;
     _mapper     = mapper;
 }
Exemplo n.º 24
0
 public RamMetricJob(IRamMetricsRepository metricsRepository, IAgentsRepository agentsRepository, IMetricsClient metricsClient)
 {
     _metricsRepository = metricsRepository;
     _agentsRepository  = agentsRepository;
     _metricsClient     = metricsClient;
 }
Exemplo n.º 25
0
 public RamMetricsController(ILogger <RamMetricsController> logger, IRamMetricsRepository repository)
 {
     _repository = repository;
     _logger     = logger;
     _logger.LogDebug(1, "NLog втроен в RamMetricsController");
 }
Exemplo n.º 26
0
 public RamMetricJob(IRamMetricsRepository repository)
 {
     _repository = repository;
     _RamCounter = new PerformanceCounter("Memory", "Available MBytes", null);
 }
 public RamMetricsAgentController(IRamMetricsRepository repository, ILogger <RamMetricsAgentController> logger)
 {
     _repository = repository;
     _logger     = logger;
     _logger.LogDebug(1, "Nlog встроен в RamMetricsAgentController");
 }
 public RamMetricsController(IRamMetricsRepository repository)
 {
     this.repository = repository;
 }
Exemplo n.º 29
0
 public RamMetricsFromAgents(IRamMetricsRepository repositoryRam, IAgentsRepository repositoryAgent, IMetricsManagerClient client)
 {
     _repositoryRam   = repositoryRam;
     _repositoryAgent = repositoryAgent;
     _client          = client;
 }
Exemplo n.º 30
0
 public RamMetricJob(IRamMetricsRepository repository, IAgentRepository agentsRepository, IMetricsAgentClient metricsAgentClient)
 {
     _repository         = repository;
     _metricsAgentClient = metricsAgentClient;
     _agentsRepository   = agentsRepository;
 }