Exemple #1
0
 private void ValidateOptions(ApigeeClientOptions options)
 {
     if (options.EntitiesLimit <= 1)
     {
         throw new ApigeeSdkException("Incorrect entities limit: {options.EntitiesLimit}. Should be more than 1.");
     }
 }
Exemple #2
0
        public ApigeeClient(ApigeeClientOptions options, HttpClient http = null)
        {
            ValidateOptions(options);

            http ??= new HttpClient
            {
                Timeout = options.HttpTimeout
            };

            _organizationName = options.OrgName;
            _environmentName  = options.EnvName;
            _baseUrl          = options.BaseUrl;
            _entitiesLimit    = options.EntitiesLimit;
            _httpService      = new HttpServiceAuthenticated(options, http);
        }