1. Updated ViewComponent to exposes 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. |
||
|---|---|---|
| .. | ||
| ContentViewComponentResultTest.cs | ||
| DefaultViewComponentSelectorTest.cs | ||
| JsonViewComponentResultTest.cs | ||
| ViewComponentConventionsTest.cs | ||
| ViewViewComponentResultTest.cs | ||