public MainApiDisciplineService(IBearerTokenApiClient mainApiClient, IOptionsMonitor <MainApiOptions> options) { _mainApiClient = mainApiClient; _apiVersion = options.CurrentValue.ApiVersion; _baseAddress = new Uri(options.CurrentValue.BaseAddress); }
public LibraryApiFunctionalRoleService( IBearerTokenApiClient foreignApiClient, IOptionsMonitor <LibraryApiOptions> options) { _foreignApiClient = foreignApiClient; _baseAddress = new Uri(options.CurrentValue.BaseAddress); }
public MainApiProjectService( IBearerTokenApiClient foreignApiClient, IOptionsMonitor <MainApiOptions> options) { _foreignApiClient = foreignApiClient; _apiVersion = options.CurrentValue.ApiVersion; _baseAddress = new Uri(options.CurrentValue.BaseAddress); }
public GetAllResponsiblesQueryHandler( IBearerTokenApiClient mainApiClient, IOptionsMonitor <MainApiOptions> options) { _apiVersion = options.CurrentValue.ApiVersion; _baseAddress = new Uri(options.CurrentValue.BaseAddress); _mainApiClient = mainApiClient; }
public MainApiResponsibleService(IBearerTokenApiClient mainApiClient, IPlantCache plantCache, IOptionsMonitor <MainApiOptions> options) { _mainApiClient = mainApiClient; _plantCache = plantCache; _apiVersion = options.CurrentValue.ApiVersion; _baseAddress = new Uri(options.CurrentValue.BaseAddress); }
public MainApiTagService( IBearerTokenApiClient mainApiClient, IOptionsMonitor <MainApiOptions> options, ILogger <MainApiTagService> logger) { _mainApiClient = mainApiClient; _apiVersion = options.CurrentValue.ApiVersion; _baseAddress = new Uri(options.CurrentValue.BaseAddress); if (options.CurrentValue.TagSearchPageSize < 1) { throw new ArgumentOutOfRangeException(nameof(options.CurrentValue.TagSearchPageSize), "Must be a positive number."); } _tagSearchPageSize = options.CurrentValue.TagSearchPageSize; if (_tagSearchPageSize < 100) { logger.LogWarning("Tag search page size is set to a low value. This may impact the overall performance!"); } if (_tagSearchPageSize <= 0) { throw new Exception($"{nameof(options.CurrentValue.TagSearchPageSize)} can't be zero or negative"); } }