DefaultViewComponentFactory no longer allocates new lambda delegate on each call to CreateViewComponent

This commit is contained in:
apxoht 2016-10-04 14:59:37 +03:00 committed by Ryan Nowak
parent de7cea4000
commit 268617ddba
1 changed files with 1 additions and 5 deletions

View File

@ -59,11 +59,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewComponents
{
var propertiesToActivate = _injectActions.GetOrAdd(
viewComponent.GetType(),
type =>
PropertyActivator<ViewComponentContext>.GetPropertiesToActivate(
type,
typeof(ViewComponentContextAttribute),
CreateActivateInfo));
_getPropertiesToActivate);
for (var i = 0; i < propertiesToActivate.Length; i++)
{