/// <summary> /// Initializes a new instance of the <see cref="BirstServiceWrapper"/> class. /// </summary> /// <param name="configuration">The configuration.</param> public BirstServiceWrapper(IBirstConfiguration configuration) { if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } if (configuration.Uri == null) { throw new BirstException("Birst has not been configured for this environment"); } CreateService(configuration.Uri); }
/// <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; }