Skip to content

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

Description

@PTwr

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions