Ejemplo n.º 1
0
 private void ValidateOptions(ApigeeClientOptions options)
 {
     if (options.EntitiesLimit <= 1)
     {
         throw new ApigeeSdkException("Incorrect entities limit: {options.EntitiesLimit}. Should be more than 1.");
     }
 }
Ejemplo n.º 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);
        }