Adding support for ActivateAttribute via IControllerActivator

This mechanism replaces code in Inject that activated properties
by looking them up by names.


Different pr + issue

-----Original Message-----
From: "Pranav K" <notifications@github.com>
Sent: ‎6/‎20/‎2014 6:08 AM
To: "aspnet/Mvc" <Mvc@noreply.github.com>
Cc: "Yishai Galatzer" <yishai_galatzer@yahoo.com>
Subject: Re: [Mvc] Adding support for ActivateAttribute viaIControllerActivator (#648)

In src/Microsoft.AspNet.Mvc.Core/ReflectedActionInvoker.cs:
> @@ -57,8 +57,20 @@ public class ReflectedActionInvoker : IActionInvoker
>  
>          public async Task InvokeActionAsync()
>          {
> -            _actionContext.Controller = _controllerFactory.CreateController(_actionContext);
> +            var controller = _controllerFactory.CreateController(_actionContext);
> +            try
> +            {
> +                _actionContext.Controller = controller;
> +                await InvokeActionAsyncCore();
> +            }
> +            finally
> +            {
> +                _controllerFactory.ReleaseController(controller);
Fair enough, I'll undo it.
—
Reply to this email directly or view it on GitHub.