Beispiel #1
0
 public CreateOrUpdateContactsInHubSpot(IHttpClientFacade http, IClock clock, IJsonSerializer serializer, ISleep sleeper, string hubSpotApiKey, ILogger <CreateOrUpdateContactsInHubSpot> logger)
 {
     _http          = http ?? throw new ArgumentNullException(nameof(http));
     _clock         = clock ?? throw new ArgumentNullException(nameof(clock));
     _serializer    = serializer ?? throw new ArgumentNullException(nameof(serializer));
     _sleeper       = sleeper ?? throw new ArgumentNullException(nameof(sleeper));
     _hubSpotApiKey = hubSpotApiKey ?? throw new ArgumentNullException(nameof(hubSpotApiKey));
     _logger        = logger ?? throw new ArgumentNullException(nameof(logger));
 }
        /// <summary>
        /// Creates a new instance of <see cref="BirstAdminService"/>
        /// </summary>
        /// <param name="birstConfiguration">The Birst configuration.</param>
        /// <param name="birstServiceWrapper">The Birst service wrapper.</param>
        /// <param name="httpClient">The http client.</param>
        public BirstAdminService(IBirstConfiguration birstConfiguration, IBirstServiceWrapper birstServiceWrapper, IHttpClientFacade httpClient)
        {
            if (birstConfiguration == null)
            {
                throw new ArgumentNullException(nameof(birstConfiguration));
            }
            if (birstServiceWrapper == null)
            {
                throw new ArgumentNullException(nameof(birstServiceWrapper));
            }
            if (httpClient == null)
            {
                throw new ArgumentNullException(nameof(httpClient));
            }

            _birstConfiguration  = birstConfiguration;
            _birstServiceWrapper = birstServiceWrapper;
            _httpClient          = httpClient;
        }