public TVDBClient( HttpClient client, IOptions <TVDBClientOptions> options, TVDBContext context) { if (!options.Value.ShareContextBetweenClients) { // If we don't want to share the context, we are creating one just for this client context = new TVDBContext(); } Series = new SeriesClient(client, options, context); Search = new SearchClient(client, options, context); Episodes = new EpisodesClient(client, options, context); Updates = new UpdatesClient(client, options, context); Languages = new LanguagesClient(client, options, context); Users = new UsersClient(client, options, context); Authentication = new AuthenticationClient(client, options, context); }
protected BaseClient(HttpClient client, IOptions <TVDBClientOptions> options, TVDBContext context) { _client = client ?? throw new ArgumentNullException(nameof(client)); _options = options?.Value ?? throw new ArgumentNullException(nameof(options)); _context = context ?? throw new ArgumentNullException(nameof(context)); }