Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DI issue in EndpointRouterDecorator #1845

Closed
wants to merge 3 commits into from
Closed

Fix DI issue in EndpointRouterDecorator #1845

wants to merge 3 commits into from

Conversation

bjqian
Copy link
Contributor

@bjqian bjqian commented Oct 17, 2023

Summary of the changes (Less than 80 chars)

The EndpointRouterDecorator is injected before the DefaultEndpointRouter in our example. To avoid the DI issue when customer partially override the EndpointRouterDecorator, DI options too.

@bjqian
Copy link
Contributor Author

bjqian commented Oct 17, 2023

Change to use a new ctor to avoid binary breaking change

@@ -15,6 +16,11 @@ public EndpointRouterDecorator(IEndpointRouter router = null)
_inner = router ?? new DefaultEndpointRouter(null);
}

public EndpointRouterDecorator(IEndpointRouter router = null, IOptions<ServiceOptions> options = null)
Copy link
Member

@vicancy vicancy Oct 17, 2023

Choose a reason for hiding this comment

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

change to ctors without default value?

public EndpointRouterDecorator()
public EndpointRouterDecorator(IEndpointRouter router)
public EndpointRouterDecorator(IEndpointRouter router, IOptions<ServiceOptions> options)

@bjqian
Copy link
Contributor Author

bjqian commented Oct 17, 2023

Remove endpointRouteMode from serviceOptions

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