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

Add easier way to set ConfigureAction priority to after ExtCore internals #125

Open
PTwr opened this issue Jun 4, 2018 · 0 comments
Open
Milestone

Comments

@PTwr
Copy link

PTwr commented Jun 4, 2018

Low priority quality-of-life related to: #109 (comment)

Currently ExtCore uses hardcoded magic numbers for ConfigureAction's Priority, for example

public int Priority => 1000;

public int Priority => 10000;

Moving to Priorities to public const would allow developers to write:
public int Priority => AfterExtCore + MyNumber;
public int Priority => AfterExtCoreMvc + MyNumber;
to ensure extension actions are called after whole environment is set up.

Alternate approach could be firing
IMvcConfigureEvent : IEventHandler<IServiceCollection,IServiceProvider>
to mimic ConfigureAction but it would cause more coupling of plugin with ExtCore, which might be bothersome for developers so it might be better as optional feature, not requirement.

Mvc 10k priority caused my team some weird issues in black magic overriding default Mvc behavior until we randomly tried very big numbers :)

@DmitrySikorsky DmitrySikorsky added this to the 5.0.0 milestone Aug 8, 2019
@DmitrySikorsky DmitrySikorsky modified the milestones: 5.0.0, 6.0.0 Nov 16, 2019
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

No branches or pull requests

2 participants