dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
34.91k stars 9.86k forks source link

RazorPageActivator does not allow plug-able serviceResolver #2048

Closed guy-lud closed 7 years ago

guy-lud commented 7 years ago

Hello All,

The Current implementation of RazorPageActivator (and asp.net 2.0 - preview) won't allow us to use some kind of plugable ServiceProvider. since it's not easy to mimic the implementation of RazorPageActivator (two internal classes) and it's not a best practice to extract it to external code (sync issues). when Properies are resolved by IServiceResolver from HttpContext. Yes it's possible to override the IServiceProviderFactory<> but i rather not. (as SimpleInjector does not suuport it and i agree with them).

Do you believe that it will be possible to create a RazorPageActivator with virtual method on ResolveService ?

Thanks

guy-lud commented 7 years ago

moved this to MVC