26 instantiations of ViewComponentResult
Microsoft.AspNetCore.Mvc.RazorPages (4)
PageBase.cs (2)
1237
return new
ViewComponentResult
1259
return new
ViewComponentResult
PageModel.cs (2)
1595
return new
ViewComponentResult
1617
return new
ViewComponentResult
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Controller.cs (2)
249
return new
ViewComponentResult
272
return new
ViewComponentResult
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (19)
ViewComponentResultTest.cs (19)
38
var viewResult = new
ViewComponentResult
60
var viewResult = new
ViewComponentResult
();
85
var viewComponentResult = new
ViewComponentResult
108
var viewComponentResult = new
ViewComponentResult
130
var viewComponentResult = new
ViewComponentResult
155
var viewComponentResult = new
ViewComponentResult
183
var viewComponentResult = new
ViewComponentResult
()
214
var viewComponentResult = new
ViewComponentResult
()
245
var viewComponentResult = new
ViewComponentResult
()
278
var viewComponentResult = new
ViewComponentResult
()
317
var viewComponentResult = new
ViewComponentResult
()
348
var viewComponentResult = new
ViewComponentResult
()
379
var viewComponentResult = new
ViewComponentResult
()
421
var viewComponentResult = new
ViewComponentResult
()
463
var viewComponentResult = new
ViewComponentResult
()
494
var viewComponentResult = new
ViewComponentResult
()
556
var viewComponentResult = new
ViewComponentResult
()
597
var viewComponentResult = new
ViewComponentResult
()
635
var viewComponentResult = new
ViewComponentResult
()
RazorPagesWebSite (1)
Pages\ViewData\ViewDataToViewComponentPage.cs (1)
21
return 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>
1206
public 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>
1217
public 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>
1235
public 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>
1257
public 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>
1564
public 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>
1575
public 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>
1593
public 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>
1615
public virtual
ViewComponentResult
ViewComponent(Type componentType, object? arguments)
Microsoft.AspNetCore.Mvc.RazorPages.Test (6)
PageModelTest.cs (3)
1998
var
result = pageModel.ViewComponent("TagCloud");
2020
var
result = pageModel.ViewComponent(typeof(Guid));
2036
var
result = pageModel.ViewComponent(typeof(Guid), arguments);
PageTest.cs (3)
1773
var
result = page.ViewComponent("TagCloud");
1795
var
result = page.ViewComponent(typeof(Guid));
1819
var
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>
216
public 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>
228
public 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>
247
public 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>
270
public virtual
ViewComponentResult
ViewComponent(Type componentType, object? arguments)
DependencyInjection\MvcViewFeaturesMvcCoreBuilderExtensions.cs (1)
177
services.TryAddSingleton<IActionResultExecutor<
ViewComponentResult
>, ViewComponentResultExecutor>();
ViewComponentResult.cs (1)
64
var executor = services.GetService<IActionResultExecutor<
ViewComponentResult
>>();
ViewComponentResultExecutor.cs (8)
24
/// A <see cref="IActionResultExecutor{ViewComponentResult}"/> for <see cref="
ViewComponentResult
"/>.
26
public partial class ViewComponentResultExecutor : IActionResultExecutor<
ViewComponentResult
>
30
private readonly ILogger<
ViewComponentResult
> _logger;
59
_logger = loggerFactory.CreateLogger<
ViewComponentResult
>();
67
public virtual async Task ExecuteAsync(ActionContext context,
ViewComponentResult
result)
142
private static Task<IHtmlContent> GetViewComponentResult(IViewComponentHelper viewComponentHelper, ILogger logger,
ViewComponentResult
result)
147
nameof(
ViewComponentResult
.ViewComponentName),
148
nameof(
ViewComponentResult
.ViewComponentType)));
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (23)
ControllerUnitTestabilityTests.cs (3)
643
var
result = controller.ViewComponent("TagCloud");
658
var
result = controller.ViewComponent(typeof(TagCloudViewComponent));
673
var
result = controller.ViewComponent(typeof(TagCloudViewComponent), new { Arg1 = "Hi", Arg2 = "There" });
ViewComponentResultTest.cs (20)
38
var
viewResult = new ViewComponentResult
60
var
viewResult = new ViewComponentResult();
85
var
viewComponentResult = new ViewComponentResult
108
var
viewComponentResult = new ViewComponentResult
130
var
viewComponentResult = new ViewComponentResult
155
var
viewComponentResult = new ViewComponentResult
183
var
viewComponentResult = new ViewComponentResult()
214
var
viewComponentResult = new ViewComponentResult()
245
var
viewComponentResult = new ViewComponentResult()
278
var
viewComponentResult = new ViewComponentResult()
317
var
viewComponentResult = new ViewComponentResult()
348
var
viewComponentResult = new ViewComponentResult()
379
var
viewComponentResult = new ViewComponentResult()
421
var
viewComponentResult = new ViewComponentResult()
463
var
viewComponentResult = new ViewComponentResult()
494
var
viewComponentResult = new ViewComponentResult()
556
var
viewComponentResult = new ViewComponentResult()
597
var
viewComponentResult = new ViewComponentResult()
635
var
viewComponentResult = new ViewComponentResult()
680
services.AddSingleton<IActionResultExecutor<
ViewComponentResult
>, ViewComponentResultExecutor>();