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