26 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
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (19)
ViewComponentResultTest.cs (19)
38var viewResult = new ViewComponentResult 60var viewResult = new ViewComponentResult(); 85var viewComponentResult = new ViewComponentResult 108var viewComponentResult = new ViewComponentResult 130var viewComponentResult = new ViewComponentResult 155var viewComponentResult = new ViewComponentResult 183var viewComponentResult = new ViewComponentResult() 214var viewComponentResult = new ViewComponentResult() 245var viewComponentResult = new ViewComponentResult() 278var viewComponentResult = new ViewComponentResult() 317var viewComponentResult = new ViewComponentResult() 348var viewComponentResult = new ViewComponentResult() 379var viewComponentResult = new ViewComponentResult() 421var viewComponentResult = new ViewComponentResult() 463var viewComponentResult = new ViewComponentResult() 494var viewComponentResult = new ViewComponentResult() 556var viewComponentResult = new ViewComponentResult() 597var viewComponentResult = new ViewComponentResult() 635var viewComponentResult = new ViewComponentResult()
RazorPagesWebSite (1)
Pages\ViewData\ViewDataToViewComponentPage.cs (1)
21return new ViewComponentResult
75 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.RazorPages.Test (6)
PageModelTest.cs (3)
1998var result = pageModel.ViewComponent("TagCloud"); 2020var result = pageModel.ViewComponent(typeof(Guid)); 2036var result = pageModel.ViewComponent(typeof(Guid), arguments);
PageTest.cs (3)
1773var result = page.ViewComponent("TagCloud"); 1795var result = page.ViewComponent(typeof(Guid)); 1819var result = page.ViewComponent(typeof(Guid), 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)));
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (23)
ControllerUnitTestabilityTests.cs (3)
643var result = controller.ViewComponent("TagCloud"); 658var result = controller.ViewComponent(typeof(TagCloudViewComponent)); 673var result = controller.ViewComponent(typeof(TagCloudViewComponent), new { Arg1 = "Hi", Arg2 = "There" });
ViewComponentResultTest.cs (20)
38var viewResult = new ViewComponentResult 60var viewResult = new ViewComponentResult(); 85var viewComponentResult = new ViewComponentResult 108var viewComponentResult = new ViewComponentResult 130var viewComponentResult = new ViewComponentResult 155var viewComponentResult = new ViewComponentResult 183var viewComponentResult = new ViewComponentResult() 214var viewComponentResult = new ViewComponentResult() 245var viewComponentResult = new ViewComponentResult() 278var viewComponentResult = new ViewComponentResult() 317var viewComponentResult = new ViewComponentResult() 348var viewComponentResult = new ViewComponentResult() 379var viewComponentResult = new ViewComponentResult() 421var viewComponentResult = new ViewComponentResult() 463var viewComponentResult = new ViewComponentResult() 494var viewComponentResult = new ViewComponentResult() 556var viewComponentResult = new ViewComponentResult() 597var viewComponentResult = new ViewComponentResult() 635var viewComponentResult = new ViewComponentResult() 680services.AddSingleton<IActionResultExecutor<ViewComponentResult>, ViewComponentResultExecutor>();