16 instantiations of RedirectToActionResult
Microsoft.AspNetCore.Mvc.Core (4)
ControllerBase.cs (4)
542return new RedirectToActionResult(actionName, controllerName, routeValues, fragment) 566return new RedirectToActionResult( 661return new RedirectToActionResult( 690return new RedirectToActionResult(
Microsoft.AspNetCore.Mvc.Core.Test (4)
RedirectToActionResultTest.cs (4)
39var result = new RedirectToActionResult("SampleAction", null, null) 69var result = new RedirectToActionResult(null, null, null) 98var result = new RedirectToActionResult("SampleAction", "Home", null, false, "test") 126var result = new RedirectToActionResult("SampleAction", "Home", null, false, true, "test")
Microsoft.AspNetCore.Mvc.RazorPages (8)
PageBase.cs (4)
606=> new RedirectToActionResult(actionName, controllerName, routeValues, fragment); 625return new RedirectToActionResult( 721return new RedirectToActionResult( 746return new RedirectToActionResult(
PageModel.cs (4)
936return new RedirectToActionResult(actionName, controllerName, routeValues, fragment) 959return new RedirectToActionResult( 1048return new RedirectToActionResult( 1076return new RedirectToActionResult(
256 references to RedirectToActionResult
Microsoft.AspNetCore.Mvc.Core (52)
ControllerBase.cs (40)
441/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 462public virtual RedirectToActionResult RedirectToAction() 469/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 471public virtual RedirectToActionResult RedirectToAction(string? actionName) 480/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 482public virtual RedirectToActionResult RedirectToAction(string? actionName, object? routeValues) 491/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 493public virtual RedirectToActionResult RedirectToAction(string? actionName, string? controllerName) 503/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 505public virtual RedirectToActionResult RedirectToAction( 518/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 520public virtual RedirectToActionResult RedirectToAction( 534/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 536public virtual RedirectToActionResult RedirectToAction( 550/// <see cref="RedirectToActionResult.Permanent"/> set to false and <see cref="RedirectToActionResult.PreserveMethod"/> 558/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 560public virtual RedirectToActionResult RedirectToActionPreserveMethod( 580/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/>. 583/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 585public virtual RedirectToActionResult RedirectToActionPermanent(string? actionName) 590/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/> 595/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 597public virtual RedirectToActionResult RedirectToActionPermanent(string? actionName, object? routeValues) 602/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/> 607/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 609public virtual RedirectToActionResult RedirectToActionPermanent(string? actionName, string? controllerName) 614/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/>, 620/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 622public virtual RedirectToActionResult RedirectToActionPermanent( 630/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/>, 636/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 638public virtual RedirectToActionResult RedirectToActionPermanent( 646/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/>, 653/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 655public virtual RedirectToActionResult RedirectToActionPermanent( 674/// <see cref="RedirectToActionResult.Permanent"/> set to true and <see cref="RedirectToActionResult.PreserveMethod"/> 682/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 684public virtual RedirectToActionResult RedirectToActionPermanentPreserveMethod(
DependencyInjection\MvcCoreServiceCollectionExtensions.cs (1)
242services.TryAddSingleton<IActionResultExecutor<RedirectToActionResult>, RedirectToActionResultExecutor>();
Infrastructure\RedirectToActionResultExecutor.cs (4)
12/// A <see cref="IActionResultExecutor{RedirectToActionResult}"/> for <see cref="RedirectToActionResult"/>. 14public partial class RedirectToActionResultExecutor : IActionResultExecutor<RedirectToActionResult> 29_logger = loggerFactory.CreateLogger<RedirectToActionResult>(); 34public virtual Task ExecuteAsync(ActionContext context, RedirectToActionResult result)
RedirectToActionResult.cs (7)
19/// Initializes a new instance of the <see cref="RedirectToActionResult"/> with the values 34/// Initializes a new instance of the <see cref="RedirectToActionResult"/> with the values 51/// Initializes a new instance of the <see cref="RedirectToActionResult"/> with the values 68/// Initializes a new instance of the <see cref="RedirectToActionResult"/> with the values 87/// Initializes a new instance of the <see cref="RedirectToActionResult"/> with the values 106/// Initializes a new instance of the <see cref="RedirectToActionResult"/> with the values 171var executor = context.HttpContext.RequestServices.GetRequiredService<IActionResultExecutor<RedirectToActionResult>>();
Microsoft.AspNetCore.Mvc.Core.Test (45)
ControllerBaseTest.cs (40)
288var resultTemporary = controller.RedirectToAction("SampleAction"); 291Assert.IsType<RedirectToActionResult>(resultTemporary); 304var resultTemporary = controller.RedirectToActionPreserveMethod(actionName: "SampleAction"); 307Assert.IsType<RedirectToActionResult>(resultTemporary); 320var resultPermanent = controller.RedirectToActionPermanent("SampleAction"); 323Assert.IsType<RedirectToActionResult>(resultPermanent); 336var resultPermanent = controller.RedirectToActionPermanentPreserveMethod(actionName: "SampleAction"); 339Assert.IsType<RedirectToActionResult>(resultPermanent); 355var resultTemporary = controller.RedirectToAction("SampleAction", controllerName); 358Assert.IsType<RedirectToActionResult>(resultTemporary); 375var resultTemporary = controller.RedirectToActionPreserveMethod(actionName: "SampleAction", controllerName: controllerName); 378Assert.IsType<RedirectToActionResult>(resultTemporary); 395var resultPermanent = controller.RedirectToActionPermanent("SampleAction", controllerName); 398Assert.IsType<RedirectToActionResult>(resultPermanent); 415var resultPermanent = controller.RedirectToActionPermanentPreserveMethod(actionName: "SampleAction", controllerName: controllerName); 418Assert.IsType<RedirectToActionResult>(resultPermanent); 435var resultTemporary = controller.RedirectToAction("SampleAction", "SampleController", routeValues); 438Assert.IsType<RedirectToActionResult>(resultTemporary); 456var resultTemporary = controller.RedirectToActionPreserveMethod( 462Assert.IsType<RedirectToActionResult>(resultTemporary); 480var resultPermanent = controller.RedirectToActionPermanent( 486Assert.IsType<RedirectToActionResult>(resultPermanent); 504var resultPermanent = controller.RedirectToActionPermanentPreserveMethod( 510Assert.IsType<RedirectToActionResult>(resultPermanent); 528var resultTemporary = controller.RedirectToAction(actionName: null, routeValues: routeValues); 531Assert.IsType<RedirectToActionResult>(resultTemporary); 548var resultTemporary = controller.RedirectToActionPreserveMethod(actionName: null, routeValues: routeValues); 551Assert.IsType<RedirectToActionResult>(resultTemporary); 571var result = controller.RedirectToAction("Action", "Home", routeValues, "test"); 574Assert.IsType<RedirectToActionResult>(result); 596var result = controller.RedirectToActionPreserveMethod("Action", "Home", routeValues, "test"); 599Assert.IsType<RedirectToActionResult>(result); 618var resultPermanent = controller.RedirectToActionPermanent(null, routeValues); 621Assert.IsType<RedirectToActionResult>(resultPermanent); 638var resultPermanent = controller.RedirectToActionPermanentPreserveMethod(actionName: null, routeValues: routeValues); 641Assert.IsType<RedirectToActionResult>(resultPermanent); 661var result = controller.RedirectToActionPermanent("Action", "Home", routeValues, fragment: "test"); 664Assert.IsType<RedirectToActionResult>(result); 686var result = controller.RedirectToActionPermanentPreserveMethod( 693Assert.IsType<RedirectToActionResult>(result);
RedirectToActionResultTest.cs (5)
39var result = new RedirectToActionResult("SampleAction", null, null) 69var result = new RedirectToActionResult(null, null, null) 98var result = new RedirectToActionResult("SampleAction", "Home", null, false, "test") 126var result = new RedirectToActionResult("SampleAction", "Home", null, false, true, "test") 150services.AddSingleton<IActionResultExecutor<RedirectToActionResult>, RedirectToActionResultExecutor>();
Microsoft.AspNetCore.Mvc.RazorPages (76)
PageBase.cs (38)
540/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 541public virtual RedirectToActionResult RedirectToAction(string? actionName) 550/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 551public virtual RedirectToActionResult RedirectToAction(string? actionName, object? routeValues) 560/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 561public virtual RedirectToActionResult RedirectToAction(string? actionName, string? controllerName) 571/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 572public virtual RedirectToActionResult RedirectToAction( 585/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 586public virtual RedirectToActionResult RedirectToAction( 600/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 601public virtual RedirectToActionResult RedirectToAction( 610/// <see cref="RedirectToActionResult.Permanent"/> set to false and <see cref="RedirectToActionResult.PreserveMethod"/> 618/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 619public virtual RedirectToActionResult RedirectToActionPreserveMethod( 636/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/>. 639/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 640public virtual RedirectToActionResult RedirectToActionPermanent(string? actionName) 647/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/> 652/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 653public virtual RedirectToActionResult RedirectToActionPermanent(string? actionName, object? routeValues) 660/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/> 665/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 666public virtual RedirectToActionResult RedirectToActionPermanent(string? actionName, string? controllerName) 673/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/>, 679/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 680public virtual RedirectToActionResult RedirectToActionPermanent( 690/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/>, 696/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 697public virtual RedirectToActionResult RedirectToActionPermanent( 707/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/>, 714/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 715public virtual RedirectToActionResult RedirectToActionPermanent( 731/// <see cref="RedirectToActionResult.Permanent"/> set to true and <see cref="RedirectToActionResult.PreserveMethod"/> 739/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 740public virtual RedirectToActionResult RedirectToActionPermanentPreserveMethod(
PageModel.cs (38)
869/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 870public virtual RedirectToActionResult RedirectToAction(string? actionName) 879/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 880public virtual RedirectToActionResult RedirectToAction(string? actionName, object? routeValues) 889/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 890public virtual RedirectToActionResult RedirectToAction(string? actionName, string? controllerName) 900/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 901public virtual RedirectToActionResult RedirectToAction( 914/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 915public virtual RedirectToActionResult RedirectToAction( 929/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 930public virtual RedirectToActionResult RedirectToAction( 944/// <see cref="RedirectToActionResult.Permanent"/> set to false and <see cref="RedirectToActionResult.PreserveMethod"/> 952/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 953public virtual RedirectToActionResult RedirectToActionPreserveMethod( 973/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/>. 976/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 977public virtual RedirectToActionResult RedirectToActionPermanent(string? actionName) 982/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/> 987/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 988public virtual RedirectToActionResult RedirectToActionPermanent(string? actionName, object? routeValues) 993/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/> 998/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 999public virtual RedirectToActionResult RedirectToActionPermanent(string? actionName, string? controllerName) 1004/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/>, 1010/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 1011public virtual RedirectToActionResult RedirectToActionPermanent( 1019/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/>, 1025/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 1026public virtual RedirectToActionResult RedirectToActionPermanent( 1034/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/>, 1041/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 1042public virtual RedirectToActionResult RedirectToActionPermanent( 1061/// <see cref="RedirectToActionResult.Permanent"/> set to true and <see cref="RedirectToActionResult.PreserveMethod"/> 1069/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns> 1070public virtual RedirectToActionResult RedirectToActionPermanentPreserveMethod(
Microsoft.AspNetCore.Mvc.RazorPages.Test (80)
PageModelTest.cs (40)
279var resultTemporary = pageModel.RedirectToAction("SampleAction"); 282Assert.IsType<RedirectToActionResult>(resultTemporary); 295var resultTemporary = pageModel.RedirectToActionPreserveMethod(actionName: "SampleAction"); 298Assert.IsType<RedirectToActionResult>(resultTemporary); 311var resultPermanent = pageModel.RedirectToActionPermanent("SampleAction"); 314Assert.IsType<RedirectToActionResult>(resultPermanent); 327var resultPermanent = pageModel.RedirectToActionPermanentPreserveMethod(actionName: "SampleAction"); 330Assert.IsType<RedirectToActionResult>(resultPermanent); 346var resultTemporary = pageModel.RedirectToAction("SampleAction", controllerName); 349Assert.IsType<RedirectToActionResult>(resultTemporary); 366var resultTemporary = pageModel.RedirectToActionPreserveMethod(actionName: "SampleAction", controllerName: controllerName); 369Assert.IsType<RedirectToActionResult>(resultTemporary); 386var resultPermanent = pageModel.RedirectToActionPermanent("SampleAction", controllerName); 389Assert.IsType<RedirectToActionResult>(resultPermanent); 406var resultPermanent = pageModel.RedirectToActionPermanentPreserveMethod(actionName: "SampleAction", controllerName: controllerName); 409Assert.IsType<RedirectToActionResult>(resultPermanent); 426var resultTemporary = pageModel.RedirectToAction("SampleAction", "SampleController", routeValues); 429Assert.IsType<RedirectToActionResult>(resultTemporary); 447var resultTemporary = pageModel.RedirectToActionPreserveMethod( 453Assert.IsType<RedirectToActionResult>(resultTemporary); 471var resultPermanent = pageModel.RedirectToActionPermanent( 477Assert.IsType<RedirectToActionResult>(resultPermanent); 495var resultPermanent = pageModel.RedirectToActionPermanentPreserveMethod( 501Assert.IsType<RedirectToActionResult>(resultPermanent); 519var resultTemporary = pageModel.RedirectToAction(actionName: null, routeValues: routeValues); 522Assert.IsType<RedirectToActionResult>(resultTemporary); 539var resultTemporary = pageModel.RedirectToActionPreserveMethod(actionName: null, routeValues: routeValues); 542Assert.IsType<RedirectToActionResult>(resultTemporary); 562var result = pageModel.RedirectToAction("Action", "Home", routeValues, "test"); 565Assert.IsType<RedirectToActionResult>(result); 587var result = pageModel.RedirectToActionPreserveMethod("Action", "Home", routeValues, "test"); 590Assert.IsType<RedirectToActionResult>(result); 609var resultPermanent = pageModel.RedirectToActionPermanent(null, routeValues); 612Assert.IsType<RedirectToActionResult>(resultPermanent); 629var resultPermanent = pageModel.RedirectToActionPermanentPreserveMethod(actionName: null, routeValues: routeValues); 632Assert.IsType<RedirectToActionResult>(resultPermanent); 652var result = pageModel.RedirectToActionPermanent("Action", "Home", routeValues, fragment: "test"); 655Assert.IsType<RedirectToActionResult>(result); 677var result = pageModel.RedirectToActionPermanentPreserveMethod( 684Assert.IsType<RedirectToActionResult>(result);
PageTest.cs (40)
299var resultTemporary = page.RedirectToAction("SampleAction"); 302Assert.IsType<RedirectToActionResult>(resultTemporary); 315var resultTemporary = page.RedirectToActionPreserveMethod(actionName: "SampleAction"); 318Assert.IsType<RedirectToActionResult>(resultTemporary); 331var resultPermanent = page.RedirectToActionPermanent("SampleAction"); 334Assert.IsType<RedirectToActionResult>(resultPermanent); 347var resultPermanent = page.RedirectToActionPermanentPreserveMethod(actionName: "SampleAction"); 350Assert.IsType<RedirectToActionResult>(resultPermanent); 366var resultTemporary = page.RedirectToAction("SampleAction", controllerName); 369Assert.IsType<RedirectToActionResult>(resultTemporary); 386var resultTemporary = page.RedirectToActionPreserveMethod(actionName: "SampleAction", controllerName: controllerName); 389Assert.IsType<RedirectToActionResult>(resultTemporary); 406var resultPermanent = page.RedirectToActionPermanent("SampleAction", controllerName); 409Assert.IsType<RedirectToActionResult>(resultPermanent); 426var resultPermanent = page.RedirectToActionPermanentPreserveMethod(actionName: "SampleAction", controllerName: controllerName); 429Assert.IsType<RedirectToActionResult>(resultPermanent); 446var resultTemporary = page.RedirectToAction("SampleAction", "SampleController", routeValues); 449Assert.IsType<RedirectToActionResult>(resultTemporary); 467var resultTemporary = page.RedirectToActionPreserveMethod( 473Assert.IsType<RedirectToActionResult>(resultTemporary); 491var resultPermanent = page.RedirectToActionPermanent( 497Assert.IsType<RedirectToActionResult>(resultPermanent); 515var resultPermanent = page.RedirectToActionPermanentPreserveMethod( 521Assert.IsType<RedirectToActionResult>(resultPermanent); 539var resultTemporary = page.RedirectToAction(actionName: null, routeValues: routeValues); 542Assert.IsType<RedirectToActionResult>(resultTemporary); 559var resultTemporary = page.RedirectToActionPreserveMethod(actionName: null, routeValues: routeValues); 562Assert.IsType<RedirectToActionResult>(resultTemporary); 582var result = page.RedirectToAction("Action", "Home", routeValues, "test"); 585Assert.IsType<RedirectToActionResult>(result); 607var result = page.RedirectToActionPreserveMethod("Action", "Home", routeValues, "test"); 610Assert.IsType<RedirectToActionResult>(result); 629var resultPermanent = page.RedirectToActionPermanent(null, routeValues); 632Assert.IsType<RedirectToActionResult>(resultPermanent); 649var resultPermanent = page.RedirectToActionPermanentPreserveMethod(actionName: null, routeValues: routeValues); 652Assert.IsType<RedirectToActionResult>(resultPermanent); 672var result = page.RedirectToActionPermanent("Action", "Home", routeValues, fragment: "test"); 675Assert.IsType<RedirectToActionResult>(result); 697var result = page.RedirectToActionPermanentPreserveMethod( 704Assert.IsType<RedirectToActionResult>(result);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (3)
ControllerUnitTestabilityTests.cs (3)
516var redirectToActionResult = Assert.IsType<RedirectToActionResult>(result); 531redirectToActionResult = Assert.IsType<RedirectToActionResult>(result);