21 instantiations of ViewResult
Microsoft.AspNetCore.Mvc.Core.Test (1)
Infrastructure\ActionMethodExecutorTest.cs (1)
492
public Task<ViewResult> ReturnActionResultAsync() => Task.FromResult(new
ViewResult
{ StatusCode = 200 });
Microsoft.AspNetCore.Mvc.RazorPages.Test (2)
Infrastructure\ExecutorFactoryTest.cs (2)
235
public ViewResult ConcreteActionResult() => new
ViewResult
();
280
public ViewResult ConcreteActionResult() => new
ViewResult
();
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Controller.cs (1)
146
return new
ViewResult
()
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (17)
ViewResultExecutorTest.cs (10)
38
var viewResult = new
ViewResult
62
var viewResult = new
ViewResult
86
var viewResult = new
ViewResult
116
var viewResult = new
ViewResult
150
var viewResult = new
ViewResult
184
var viewResult = new
ViewResult
213
var viewResult = new
ViewResult
254
var viewResult = new
ViewResult
284
var viewResult = new
ViewResult
308
var viewResult = new
ViewResult
ViewResultTest.cs (7)
28
var viewResult = new
ViewResult
();
39
var viewResult = new
ViewResult
61
var viewResult = new
ViewResult
();
93
var viewResult = new
ViewResult
133
var viewResult = new
ViewResult
173
var viewResult = new
ViewResult
222
var viewResult = new
ViewResult
60 references to ViewResult
Microsoft.AspNetCore.Mvc.Core.Test (2)
Infrastructure\ActionMethodExecutorTest.cs (2)
301
Assert.IsType<
ViewResult
>(await valueTask);
492
public Task<
ViewResult
> ReturnActionResultAsync() => Task.FromResult(new ViewResult { StatusCode = 200 });
Microsoft.AspNetCore.Mvc.RazorPages.Test (3)
Infrastructure\ExecutorFactoryTest.cs (3)
49
Assert.IsType<
ViewResult
>(actionResult);
235
public
ViewResult
ConcreteActionResult() => new ViewResult();
280
public
ViewResult
ConcreteActionResult() => new ViewResult();
Microsoft.AspNetCore.Mvc.ViewFeatures (22)
Controller.cs (14)
24
/// Gets or sets <see cref="ViewDataDictionary"/> used by <see cref="
ViewResult
"/> and <see cref="ViewBag"/>.
63
/// Gets or sets <see cref="ITempDataDictionary"/> used by <see cref="
ViewResult
"/>.
102
/// Creates a <see cref="
ViewResult
"/> object that renders a view to the response.
104
/// <returns>The created <see cref="
ViewResult
"/> object for the response.</returns>
106
public virtual
ViewResult
View()
112
/// Creates a <see cref="
ViewResult
"/> object by specifying a <paramref name="viewName"/>.
115
/// <returns>The created <see cref="
ViewResult
"/> object for the response.</returns>
117
public virtual
ViewResult
View(string? viewName)
123
/// Creates a <see cref="
ViewResult
"/> object by specifying a <paramref name="model"/>
127
/// <returns>The created <see cref="
ViewResult
"/> object for the response.</returns>
129
public virtual
ViewResult
View(object? model)
135
/// Creates a <see cref="
ViewResult
"/> object by specifying a <paramref name="viewName"/>
140
/// <returns>The created <see cref="
ViewResult
"/> object for the response.</returns>
142
public virtual
ViewResult
View(string? viewName, object? model)
DependencyInjection\MvcViewFeaturesMvcCoreBuilderExtensions.cs (1)
145
services.TryAddSingleton<IActionResultExecutor<
ViewResult
>, ViewResultExecutor>();
ViewResult.cs (1)
64
var executor = context.HttpContext.RequestServices.GetService<IActionResultExecutor<
ViewResult
>>();
ViewResultExecutor.cs (6)
19
/// Finds and executes an <see cref="IView"/> for a <see cref="
ViewResult
"/>.
21
public partial class ViewResultExecutor : ViewExecutor, IActionResultExecutor<
ViewResult
>
59
/// <param name="viewResult">The <see cref="
ViewResult
"/>.</param>
61
public virtual ViewEngineResult FindView(ActionContext actionContext,
ViewResult
viewResult)
116
private void OutputDiagnostics(ActionContext actionContext,
ViewResult
viewResult, string viewName, ViewEngineResult result)
139
public async Task ExecuteAsync(ActionContext context,
ViewResult
result)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (32)
ControllerTest.cs (12)
74
var
actualViewResult = controller.View();
77
Assert.IsType<
ViewResult
>(actualViewResult);
98
var
actualViewResult = controller.View();
101
Assert.IsType<
ViewResult
>(actualViewResult);
119
var
actualViewResult = controller.View("CustomViewName");
122
Assert.IsType<
ViewResult
>(actualViewResult);
141
var
actualViewResult = controller.View(model);
144
Assert.IsType<
ViewResult
>(actualViewResult);
163
var
actualViewResult = controller.View("CustomViewName", model);
166
Assert.IsType<
ViewResult
>(actualViewResult);
185
var
actualViewResult = controller.View(model: null);
188
Assert.IsType<
ViewResult
>(actualViewResult);
ControllerUnitTestabilityTests.cs (2)
29
var
viewResult = Assert.IsType<
ViewResult
>(result);
ViewResultExecutorTest.cs (10)
38
var
viewResult = new ViewResult
62
var
viewResult = new ViewResult
86
var
viewResult = new ViewResult
116
var
viewResult = new ViewResult
150
var
viewResult = new ViewResult
184
var
viewResult = new ViewResult
213
var
viewResult = new ViewResult
254
var
viewResult = new ViewResult
284
var
viewResult = new ViewResult
308
var
viewResult = new ViewResult
ViewResultTest.cs (8)
28
var
viewResult = new ViewResult();
39
var
viewResult = new ViewResult
61
var
viewResult = new ViewResult();
93
var
viewResult = new ViewResult
133
var
viewResult = new ViewResult
173
var
viewResult = new ViewResult
222
var
viewResult = new ViewResult
257
services.AddSingleton<IActionResultExecutor<
ViewResult
>>(viewExecutor);
RazorWebSite (1)
NestedViewImportsController.cs (1)
10
public
ViewResult
Index()