aspnet/Mvc — pull request #1430 by javiercn (2014-10-21 22:27:51+00:00)
Title: [Fixes #393] [Design] Update ViewComponent result apis to be consistent with Controller

1. Updated ViewComponent to expose similar properties to the existing ones in Controller where
appropiate. We've left out Resolver for being a bad pattern (just inject the dependency on the constructor
or use Context.RequestServices to access it if needed) and Response as although available through the Context property, it shouldn't be used/modified in a ViewComponent.

2. Updated ViewViewComponentResult to follow a similar pattern as ViewResult where the constructor is
parameterless and elements like ViewEngine are resolved during execution if the user does not set the
associated property on the object.

3. Updated ExecuteAsync in JsonViewComponentResult to remove the unnecessary pragma and async keyword from the signature and to use Task.FromResult(true) instead.

4. Cleaned up ViewViewComponentResult tests.