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 :)
Low priority quality-of-life related to: #109 (comment)
Currently ExtCore uses hardcoded magic numbers for ConfigureAction's Priority, for example
ExtCore/src/ExtCore.Data/Actions/AddStorageAction.cs
Line 24 in c11eedb
ExtCore/src/ExtCore.Mvc/Actions/AddMvcAction.cs
Line 25 in 7c784db
Moving to Priorities to public
constwould 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 :)