6 instantiations of ViewComponentResult
Microsoft.AspNetCore.Mvc.RazorPages (4)
PageBase.cs (2)
1237return new ViewComponentResult 1259return new ViewComponentResult
PageModel.cs (2)
1595return new ViewComponentResult 1617return new ViewComponentResult
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Controller.cs (2)
249return new ViewComponentResult 272return new ViewComponentResult
46 references to ViewComponentResult
Microsoft.AspNetCore.Mvc.RazorPages (24)
PageBase.cs (12)
1199/// Creates a <see cref="ViewComponentResult"/> by specifying the name of a view component to render. 1205/// <returns>The created <see cref="ViewComponentResult"/> object for the response.</returns> 1206public virtual ViewComponentResult ViewComponent(string componentName) 1212/// Creates a <see cref="ViewComponentResult"/> by specifying the <see cref="Type"/> of a view component to 1216/// <returns>The created <see cref="ViewComponentResult"/> object for the response.</returns> 1217public virtual ViewComponentResult ViewComponent(Type componentType) 1223/// Creates a <see cref="ViewComponentResult"/> by specifying the name of a view component to render. 1234/// <returns>The created <see cref="ViewComponentResult"/> object for the response.</returns> 1235public virtual ViewComponentResult ViewComponent(string componentName, object? arguments) 1247/// Creates a <see cref="ViewComponentResult"/> by specifying the <see cref="Type"/> of a view component to 1256/// <returns>The created <see cref="ViewComponentResult"/> object for the response.</returns> 1257public virtual ViewComponentResult ViewComponent(Type componentType, object? arguments)
PageModel.cs (12)
1557/// Creates a <see cref="ViewComponentResult"/> by specifying the name of a view component to render. 1563/// <returns>The created <see cref="ViewComponentResult"/> object for the response.</returns> 1564public virtual ViewComponentResult ViewComponent(string componentName) 1570/// Creates a <see cref="ViewComponentResult"/> by specifying the <see cref="Type"/> of a view component to 1574/// <returns>The created <see cref="ViewComponentResult"/> object for the response.</returns> 1575public virtual ViewComponentResult ViewComponent(Type componentType) 1581/// Creates a <see cref="ViewComponentResult"/> by specifying the name of a view component to render. 1592/// <returns>The created <see cref="ViewComponentResult"/> object for the response.</returns> 1593public virtual ViewComponentResult ViewComponent(string componentName, object? arguments) 1605/// Creates a <see cref="ViewComponentResult"/> by specifying the <see cref="Type"/> of a view component to 1614/// <returns>The created <see cref="ViewComponentResult"/> object for the response.</returns> 1615public virtual ViewComponentResult ViewComponent(Type componentType, object? arguments)
Microsoft.AspNetCore.Mvc.ViewFeatures (22)
Controller.cs (12)
208/// Creates a <see cref="ViewComponentResult"/> by specifying the name of a view component to render. 214/// <returns>The created <see cref="ViewComponentResult"/> object for the response.</returns> 216public virtual ViewComponentResult ViewComponent(string componentName) 222/// Creates a <see cref="ViewComponentResult"/> by specifying the <see cref="Type"/> of a view component to 226/// <returns>The created <see cref="ViewComponentResult"/> object for the response.</returns> 228public virtual ViewComponentResult ViewComponent(Type componentType) 234/// Creates a <see cref="ViewComponentResult"/> by specifying the name of a view component to render. 245/// <returns>The created <see cref="ViewComponentResult"/> object for the response.</returns> 247public virtual ViewComponentResult ViewComponent(string componentName, object? arguments) 259/// Creates a <see cref="ViewComponentResult"/> by specifying the <see cref="Type"/> of a view component to 268/// <returns>The created <see cref="ViewComponentResult"/> object for the response.</returns> 270public virtual ViewComponentResult ViewComponent(Type componentType, object? arguments)
DependencyInjection\MvcViewFeaturesMvcCoreBuilderExtensions.cs (1)
177services.TryAddSingleton<IActionResultExecutor<ViewComponentResult>, ViewComponentResultExecutor>();
ViewComponentResult.cs (1)
64var executor = services.GetService<IActionResultExecutor<ViewComponentResult>>();
ViewComponentResultExecutor.cs (8)
24/// A <see cref="IActionResultExecutor{ViewComponentResult}"/> for <see cref="ViewComponentResult"/>. 26public partial class ViewComponentResultExecutor : IActionResultExecutor<ViewComponentResult> 30private readonly ILogger<ViewComponentResult> _logger; 59_logger = loggerFactory.CreateLogger<ViewComponentResult>(); 67public virtual async Task ExecuteAsync(ActionContext context, ViewComponentResult result) 142private static Task<IHtmlContent> GetViewComponentResult(IViewComponentHelper viewComponentHelper, ILogger logger, ViewComponentResult result) 147nameof(ViewComponentResult.ViewComponentName), 148nameof(ViewComponentResult.ViewComponentType)));