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