Skip to content

add PaywallService registration to ServiceCollectionExtensions#6

Merged
enespaywall merged 2 commits intodevfrom
feature/PW-3390
May 15, 2025
Merged

add PaywallService registration to ServiceCollectionExtensions#6
enespaywall merged 2 commits intodevfrom
feature/PW-3390

Conversation

@enespaywall
Copy link
Contributor

This pull request introduces a new overloaded method AddPaywallService in the ServiceCollectionExtensions class to provide additional flexibility when configuring paywall-related services.

Key change:

  • src/PayWall.NetCore/ServiceCollectionExtensions.cs: Added an overloaded AddPaywallService method that accepts PayWallOptions and an array of DelegatingHandler factories. This method configures multiple API clients (PaymentApiClient, PaymentPrivateApiClient, CardWallApiClient, and MemberApiClient) and registers the PayWallService as a transient service.

@enespaywall enespaywall requested a review from a team as a code owner May 15, 2025 16:08
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds an overloaded AddPaywallService extension that accepts a PayWallOptions instance and handler factory delegates for more flexible client configuration.

  • Introduced a new AddPaywallService(this IServiceCollection, PayWallOptions, params Func<IServiceProvider, DelegatingHandler>[]) overload
  • Registers four API clients and the PayWallService using the provided options and handlers
Comments suppressed due to low confidence (1)

src/PayWall.NetCore/ServiceCollectionExtensions.cs:58

  • No unit tests cover this new overload. Add integration or unit tests to verify that all API clients and the PayWallService are registered correctly when using the PayWallOptions overload.
public static void AddPaywallService(

@enespaywall enespaywall merged commit e4bdd04 into dev May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants