public AgentControlDefinitionAccessor(IAgentControlDefinitionServiceUrlProvider controlDefinitionServiceUrlProvider, IMachineNameProvider machineNameProvider, IRESTClientFactory restClientFactory, IRESTRequestFactory requestFactory) { if (controlDefinitionServiceUrlProvider == null) { throw new ArgumentNullException("controlDefinitionServiceUrlProvider"); } if (machineNameProvider == null) { throw new ArgumentNullException("machineNameProvider"); } if (restClientFactory == null) { throw new ArgumentNullException("restClientFactory"); } if (requestFactory == null) { throw new ArgumentNullException("requestFactory"); } this.controlDefinitionServiceUrlProvider = controlDefinitionServiceUrlProvider; this.machineNameProvider = machineNameProvider; this.restClientFactory = restClientFactory; this.requestFactory = requestFactory; }
public SystemInformationProvider(ITimeProvider timeProvider, IMachineNameProvider machineNameProvider, ISystemPerformanceDataProvider systemPerformanceDataProvider, IHttpStatusCodeCheckResultProvider httpStatusCodeCheckResultProvider) { if (timeProvider == null) { throw new ArgumentNullException("timeProvider"); } if (machineNameProvider == null) { throw new ArgumentNullException("machineNameProvider"); } if (systemPerformanceDataProvider == null) { throw new ArgumentNullException("systemPerformanceDataProvider"); } if (httpStatusCodeCheckResultProvider == null) { throw new ArgumentNullException("httpStatusCodeCheckResultProvider"); } this.timeProvider = timeProvider; this.machineNameProvider = machineNameProvider; this.systemPerformanceDataProvider = systemPerformanceDataProvider; this.httpStatusCodeCheckResultProvider = httpStatusCodeCheckResultProvider; }
public Interval(TimeSpan period, IEnumerable<ISendInfo> sinks, IMachineNameProvider machineNameProvider, ICounterIdentifierGenerator counterIdentifierGenerator) { _period = period; _sinks = sinks; _machineNameProvider = machineNameProvider; _counterIdentifierGenerator = counterIdentifierGenerator; _timer = new Timer(Tick, null, Timeout.InfiniteTimeSpan, period); _readers = new List<Reader>(); }
public TaskLeaseService( IRepository <TaskLeaseRecord> repository, IClock clock, IMachineNameProvider machineNameProvider) { _repository = repository; _clock = clock; _machineNameProvider = machineNameProvider; }
public TaskLeaseService( IRepository<TaskLeaseRecord> repository, IClock clock, IMachineNameProvider machineNameProvider) { _repository = repository; _clock = clock; _machineNameProvider = machineNameProvider; }
/// <summary> /// Ctor /// </summary> /// <param name="httpContext">HTTP context</param> public WebHelper(IHttpContextAccessor httpContextAccessor, HostingConfig hostingConfig, IHostApplicationLifetime applicationLifetime, IServiceProvider serviceProvider, IMachineNameProvider machineNameProvider ) { _hostingConfig = hostingConfig; _httpContextAccessor = httpContextAccessor; _applicationLifetime = applicationLifetime; _serviceProvider = serviceProvider; _machineNameProvider = machineNameProvider; }
public TaskLeaseServiceDecorator( ITaskLeaseService decorated, ICacheService cacheService, IMachineNameProvider machineNameProvider, IClock clock) { _decorated = decorated; _cacheService = cacheService; _machineNameProvider = machineNameProvider; _clock = clock; }
public string Generate(IMachineNameProvider machineNameProvider, CounterDefinition counterDefinition) { var machineName = machineNameProvider.GetMachineName(); if (string.IsNullOrEmpty(counterDefinition.InstanceName)) { return string.Format("{0}.{1}.{2}", machineName, counterDefinition.CategoryName, counterDefinition.CounterName); } return string.Format("{0}.{1}.{2}.{3}", machineName, counterDefinition.CategoryName, counterDefinition.CounterName, counterDefinition.InstanceName); }
internal Reader(CounterDefinition definition, IMachineNameProvider machineNameProvider, ICounterIdentifierGenerator counterIdentifierGenerator) { _definition = definition; _machineNameProvider = machineNameProvider; _counterIdentifierGenerator = counterIdentifierGenerator; if (_definition == null || _definition.CategoryName.IsEmpty() || _definition.CounterName.IsEmpty()) { Logger.Error("Invalid Counter Definition"); throw new ArgumentException("definition"); } _counter = new PerformanceCounter(definition.CategoryName, definition.CounterName, definition.InstanceName, true); }
public CommonController(IPaymentService paymentService, IShippingService shippingService, ICurrencyService currencyService, IMeasureService measureService, ICustomerService customerService, IUrlRecordService urlRecordService, IWebHelper webHelper, IDateTimeHelper dateTimeHelper, ILanguageService languageService, IStoreContext storeContext, ILocalizationService localizationService, IStoreService storeService, IMongoDBContext mongoDBContext, IMachineNameProvider machineNameProvider, IMediator mediator, CatalogSettings catalogSettings, CurrencySettings currencySettings, MeasureSettings measureSettings, GrandConfig grandConfig ) { _paymentService = paymentService; _shippingService = shippingService; _currencyService = currencyService; _measureService = measureService; _customerService = customerService; _urlRecordService = urlRecordService; _webHelper = webHelper; _currencySettings = currencySettings; _measureSettings = measureSettings; _dateTimeHelper = dateTimeHelper; _languageService = languageService; _storeContext = storeContext; _localizationService = localizationService; _storeService = storeService; _catalogSettings = catalogSettings; _grandConfig = grandConfig; _mongoDBContext = mongoDBContext; _machineNameProvider = machineNameProvider; _mediator = mediator; }
public CommonController(IPaymentService paymentService, IShippingService shippingService, ICurrencyService currencyService, IMeasureService measureService, ICustomerService customerService, ISlugService slugService, IDateTimeService dateTimeService, ILanguageService languageService, IWorkContext workContext, ITranslationService translationService, IStoreService storeService, IMongoDBContext mongoDBContext, IMachineNameProvider machineNameProvider, IHostApplicationLifetime applicationLifetime, IMediator mediator, IMediaFileStore mediaFileStore, CurrencySettings currencySettings, MeasureSettings measureSettings, AppConfig appConfig) { _paymentService = paymentService; _shippingService = shippingService; _currencyService = currencyService; _measureService = measureService; _customerService = customerService; _slugService = slugService; _currencySettings = currencySettings; _measureSettings = measureSettings; _dateTimeService = dateTimeService; _languageService = languageService; _workContext = workContext; _translationService = translationService; _storeService = storeService; _applicationLifetime = applicationLifetime; _appConfig = appConfig; _mongoDBContext = mongoDBContext; _machineNameProvider = machineNameProvider; _mediaFileStore = mediaFileStore; _mediator = mediator; }
public Collector(ISupplyCounterDefinitions definitionSupplier, IEnumerable<ISendInfo> sinks, IMachineNameProvider machineNameProvider = null, ICounterIdentifierGenerator counterIdentifierGenerator = null) { SetSupplier(definitionSupplier); SetMachineNameProvider(machineNameProvider); SetCounterIdentifierGenerator(counterIdentifierGenerator); _sinks = sinks.ToList(); try { if (_definitionSupplier == null) { Logger.Error("No definition supplier specified!"); throw new ArgumentException("definitionSupplier"); } ConfigureReaders(_sinks); } catch (Exception ex) { Logger.ErrorFormat("error trying to configure the collector {@exception}", ex); throw; } }
private void SetMachineNameProvider(IMachineNameProvider machineNameProvider) { _machineNameProvider = machineNameProvider ?? new DefaultMachineNameProvider(); }