/// <summary> /// Initializes instance according to parameter values. /// </summary> /// <param name="apiKey">Key to get access to OMDb service.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="apiKey" /> is <c>null</c>. /// </exception> /// <exception cref="ArgumentException"> /// <paramref name="apiKey" /> presents empty strings or contains only whitespaces. /// </exception> public OmdbCrawlerAsync(string apiKey) { apiKey.ThrowIfNullOrWhiteSpace(nameof(apiKey)); _omdbClient = OmdbClientFactory.CreateClient(apiKey); _searchResults = new HashSet <BasicInfo>(); }
/// <summary> /// Initializes instance according to parameter values. /// </summary> /// <param name="apiKey">Key to get access to OMDb service.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="apiKey" /> is <c>null</c>. /// </exception> /// <exception cref="ArgumentException"> /// <paramref name="apiKey" /> presents empty strings or contains only whitespaces. /// </exception> public OmdbCrawler(string apiKey) { apiKey.ThrowIfNullOrWhiteSpace(nameof(apiKey)); _omdbClient = OmdbClientFactory.CreateClient(apiKey); }