DefaultViewComponentFactory no longer allocates new lambda delegate on each call to CreateViewComponent
This commit is contained in:
parent
de7cea4000
commit
268617ddba
|
|
@ -59,11 +59,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewComponents
|
||||||
{
|
{
|
||||||
var propertiesToActivate = _injectActions.GetOrAdd(
|
var propertiesToActivate = _injectActions.GetOrAdd(
|
||||||
viewComponent.GetType(),
|
viewComponent.GetType(),
|
||||||
type =>
|
_getPropertiesToActivate);
|
||||||
PropertyActivator<ViewComponentContext>.GetPropertiesToActivate(
|
|
||||||
type,
|
|
||||||
typeof(ViewComponentContextAttribute),
|
|
||||||
CreateActivateInfo));
|
|
||||||
|
|
||||||
for (var i = 0; i < propertiesToActivate.Length; i++)
|
for (var i = 0; i < propertiesToActivate.Length; i++)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue