16 instantiations of RedirectToRouteResult
Microsoft.AspNetCore.Mvc.Core (4)
ControllerBase.cs (4)
756
return new
RedirectToRouteResult
(routeName, routeValues, fragment)
777
return new
RedirectToRouteResult
(
847
return new
RedirectToRouteResult
(routeName, routeValues, permanent: true, fragment: fragment)
868
return new
RedirectToRouteResult
(
Microsoft.AspNetCore.Mvc.Core.Test (4)
RedirectToRouteResultTest.cs (4)
69
var result = new
RedirectToRouteResult
(null, new Dictionary<string, object>())
103
var result = new
RedirectToRouteResult
(routeName, new { id = 10 });
127
var result = new
RedirectToRouteResult
("Sample", null, true, "test")
152
var result = new
RedirectToRouteResult
("Sample", null, true, true, "test")
Microsoft.AspNetCore.Mvc.RazorPages (8)
PageBase.cs (4)
812
return new
RedirectToRouteResult
(routeName, routeValues, fragment);
829
return new
RedirectToRouteResult
(
898
=> new
RedirectToRouteResult
(routeName, routeValues, permanent: true, fragment: fragment);
914
return new
RedirectToRouteResult
(
PageModel.cs (4)
1137
return new
RedirectToRouteResult
(routeName, routeValues, fragment)
1157
return new
RedirectToRouteResult
(
1222
return new
RedirectToRouteResult
(routeName, routeValues, permanent: true, fragment: fragment)
1242
return new
RedirectToRouteResult
(
236 references to RedirectToRouteResult
Microsoft.AspNetCore.Mvc.Core (53)
ControllerBase.cs (39)
706
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
708
public virtual
RedirectToRouteResult
RedirectToRoute(string? routeName)
715
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
717
public virtual
RedirectToRouteResult
RedirectToRoute(object? routeValues)
726
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
728
public virtual
RedirectToRouteResult
RedirectToRoute(string? routeName, object? routeValues)
737
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
739
public virtual
RedirectToRouteResult
RedirectToRoute(string? routeName, string? fragment)
749
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
751
public virtual
RedirectToRouteResult
RedirectToRoute(
764
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to false and <see cref="
RedirectToRouteResult
.PreserveMethod"/>
770
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
772
public virtual
RedirectToRouteResult
RedirectToRoutePreserveMethod(
790
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to true using the specified <paramref name="routeName"/>.
793
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
795
public virtual
RedirectToRouteResult
RedirectToRoutePermanent(string? routeName)
800
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to true using the specified <paramref name="routeValues"/>.
803
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
805
public virtual
RedirectToRouteResult
RedirectToRoutePermanent(object? routeValues)
810
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to true using the specified <paramref name="routeName"/>
815
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
817
public virtual
RedirectToRouteResult
RedirectToRoutePermanent(string? routeName, object? routeValues)
822
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to true using the specified <paramref name="routeName"/>
827
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
829
public virtual
RedirectToRouteResult
RedirectToRoutePermanent(string? routeName, string? fragment)
834
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to true using the specified <paramref name="routeName"/>,
840
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
842
public virtual
RedirectToRouteResult
RedirectToRoutePermanent(
855
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to true and <see cref="
RedirectToRouteResult
.PreserveMethod"/>
861
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
863
public virtual
RedirectToRouteResult
RedirectToRoutePermanentPreserveMethod(
1008
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to false and <see cref="
RedirectToRouteResult
.PreserveMethod"/>
1015
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
1036
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to true and <see cref="
RedirectToRouteResult
.PreserveMethod"/>
1043
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
DependencyInjection\MvcCoreServiceCollectionExtensions.cs (1)
243
services.TryAddSingleton<IActionResultExecutor<
RedirectToRouteResult
>, RedirectToRouteResultExecutor>();
Infrastructure\RedirectToPageResultExecutor.cs (1)
29
_logger = loggerFactory.CreateLogger<
RedirectToRouteResult
>();
Infrastructure\RedirectToRouteResultExecutor.cs (4)
12
/// A <see cref="IActionResultExecutor{RedirectToRouteResult}"/> for <see cref="
RedirectToRouteResult
"/>.
14
public partial class RedirectToRouteResultExecutor : IActionResultExecutor<
RedirectToRouteResult
>
29
_logger = loggerFactory.CreateLogger<
RedirectToRouteResult
>();
34
public virtual Task ExecuteAsync(ActionContext context,
RedirectToRouteResult
result)
RedirectToRouteResult.cs (8)
19
/// Initializes a new instance of the <see cref="
RedirectToRouteResult
"/> with the values
29
/// Initializes a new instance of the <see cref="
RedirectToRouteResult
"/> with the values
42
/// Initializes a new instance of the <see cref="
RedirectToRouteResult
"/> with the values
57
/// Initializes a new instance of the <see cref="
RedirectToRouteResult
"/> with the values
74
/// Initializes a new instance of the <see cref="
RedirectToRouteResult
"/> with the values
89
/// Initializes a new instance of the <see cref="
RedirectToRouteResult
"/> with the values
106
/// Initializes a new instance of the <see cref="
RedirectToRouteResult
"/> with the values
163
var executor = context.HttpContext.RequestServices.GetRequiredService<IActionResultExecutor<
RedirectToRouteResult
>>();
Microsoft.AspNetCore.Mvc.Core.Test (38)
ControllerBaseTest.cs (32)
712
var
resultTemporary = controller.RedirectToRoute(routeValues);
715
Assert.IsType<
RedirectToRouteResult
>(resultTemporary);
731
var
resultTemporary = controller.RedirectToRoutePreserveMethod(routeValues: routeValues);
734
Assert.IsType<
RedirectToRouteResult
>(resultTemporary);
752
var
result = controller.RedirectToRoute("TestRoute", routeValues, "test");
755
Assert.IsType<
RedirectToRouteResult
>(result);
775
var
result = controller.RedirectToRoutePreserveMethod(routeName: "TestRoute", routeValues: routeValues, fragment: "test");
778
Assert.IsType<
RedirectToRouteResult
>(result);
796
var
resultPermanent = controller.RedirectToRoutePermanent(routeValues);
799
Assert.IsType<
RedirectToRouteResult
>(resultPermanent);
815
var
resultPermanent = controller.RedirectToRoutePermanentPreserveMethod(routeValues: routeValues);
818
Assert.IsType<
RedirectToRouteResult
>(resultPermanent);
836
var
result = controller.RedirectToRoutePermanent("TestRoute", routeValues, "test");
839
Assert.IsType<
RedirectToRouteResult
>(result);
859
var
result = controller.RedirectToRoutePermanentPreserveMethod(routeName: "TestRoute", routeValues: routeValues, fragment: "test");
862
Assert.IsType<
RedirectToRouteResult
>(result);
878
var
resultTemporary = controller.RedirectToRoute(routeName);
881
Assert.IsType<
RedirectToRouteResult
>(resultTemporary);
895
var
resultTemporary = controller.RedirectToRoutePreserveMethod(routeName: routeName);
898
Assert.IsType<
RedirectToRouteResult
>(resultTemporary);
912
var
resultPermanent = controller.RedirectToRoutePermanent(routeName);
915
Assert.IsType<
RedirectToRouteResult
>(resultPermanent);
929
var
resultPermanent = controller.RedirectToRoutePermanentPreserveMethod(routeName: routeName);
932
Assert.IsType<
RedirectToRouteResult
>(resultPermanent);
949
var
resultTemporary = controller.RedirectToRoute(routeName, routeValues);
952
Assert.IsType<
RedirectToRouteResult
>(resultTemporary);
970
var
resultTemporary = controller.RedirectToRoutePreserveMethod(routeName: routeName, routeValues: routeValues);
973
Assert.IsType<
RedirectToRouteResult
>(resultTemporary);
991
var
resultPermanent = controller.RedirectToRoutePermanent(routeName, routeValues);
994
Assert.IsType<
RedirectToRouteResult
>(resultPermanent);
1278
var
resultPermanent = controller.RedirectToRoutePermanentPreserveMethod(routeName: routeName, routeValues: routeValues);
1281
Assert.IsType<
RedirectToRouteResult
>(resultPermanent);
RedirectToRouteResultTest.cs (6)
39
var
result = new RedirectToRouteResult(null, PropertyHelper.ObjectToDictionary(values))
69
var
result = new RedirectToRouteResult(null, new Dictionary<string, object>())
103
var
result = new RedirectToRouteResult(routeName, new { id = 10 });
127
var
result = new RedirectToRouteResult("Sample", null, true, "test")
152
var
result = new RedirectToRouteResult("Sample", null, true, true, "test")
178
services.AddSingleton<IActionResultExecutor<
RedirectToRouteResult
>, RedirectToRouteResultExecutor>();
Microsoft.AspNetCore.Mvc.RazorPages (78)
PageBase.cs (39)
759
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
760
public virtual
RedirectToRouteResult
RedirectToRoute(string? routeName)
769
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
770
public virtual
RedirectToRouteResult
RedirectToRoute(object? routeValues)
781
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
782
public virtual
RedirectToRouteResult
RedirectToRoute(string? routeName, object? routeValues)
793
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
794
public virtual
RedirectToRouteResult
RedirectToRoute(string? routeName, string? fragment)
806
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
807
public virtual
RedirectToRouteResult
RedirectToRoute(
817
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to false and <see cref="
RedirectToRouteResult
.PreserveMethod"/>
823
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
824
public virtual
RedirectToRouteResult
RedirectToRoutePreserveMethod(
839
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to true using the specified <paramref name="routeName"/>.
842
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
843
public virtual
RedirectToRouteResult
RedirectToRoutePermanent(string? routeName)
850
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to true using the specified <paramref name="routeValues"/>.
853
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
854
public virtual
RedirectToRouteResult
RedirectToRoutePermanent(object? routeValues)
861
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to true using the specified <paramref name="routeName"/>
866
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
867
public virtual
RedirectToRouteResult
RedirectToRoutePermanent(string? routeName, object? routeValues)
874
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to true using the specified <paramref name="routeName"/>
879
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
880
public virtual
RedirectToRouteResult
RedirectToRoutePermanent(string? routeName, string? fragment)
887
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to true using the specified <paramref name="routeName"/>,
893
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
894
public virtual
RedirectToRouteResult
RedirectToRoutePermanent(
902
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to true and <see cref="
RedirectToRouteResult
.PreserveMethod"/>
908
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
909
public virtual
RedirectToRouteResult
RedirectToRoutePermanentPreserveMethod(
1052
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to false and <see cref="
RedirectToRouteResult
.PreserveMethod"/>
1059
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
1077
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to true and <see cref="
RedirectToRouteResult
.PreserveMethod"/>
1084
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
PageModel.cs (39)
1092
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
1093
public virtual
RedirectToRouteResult
RedirectToRoute(string? routeName)
1100
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
1101
public virtual
RedirectToRouteResult
RedirectToRoute(object? routeValues)
1110
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
1111
public virtual
RedirectToRouteResult
RedirectToRoute(string? routeName, object? routeValues)
1120
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
1121
public virtual
RedirectToRouteResult
RedirectToRoute(string? routeName, string? fragment)
1131
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
1132
public virtual
RedirectToRouteResult
RedirectToRoute(
1145
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to false and <see cref="
RedirectToRouteResult
.PreserveMethod"/>
1151
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
1152
public virtual
RedirectToRouteResult
RedirectToRoutePreserveMethod(
1170
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to true using the specified <paramref name="routeName"/>.
1173
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
1174
public virtual
RedirectToRouteResult
RedirectToRoutePermanent(string? routeName)
1179
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to true using the specified <paramref name="routeValues"/>.
1182
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
1183
public virtual
RedirectToRouteResult
RedirectToRoutePermanent(object? routeValues)
1188
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to true using the specified <paramref name="routeName"/>
1193
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
1194
public virtual
RedirectToRouteResult
RedirectToRoutePermanent(string? routeName, object? routeValues)
1199
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to true using the specified <paramref name="routeName"/>
1204
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
1205
public virtual
RedirectToRouteResult
RedirectToRoutePermanent(string? routeName, string? fragment)
1210
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to true using the specified <paramref name="routeName"/>,
1216
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
1217
public virtual
RedirectToRouteResult
RedirectToRoutePermanent(
1230
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to true and <see cref="
RedirectToRouteResult
.PreserveMethod"/>
1236
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
1237
public virtual
RedirectToRouteResult
RedirectToRoutePermanentPreserveMethod(
1404
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to false and <see cref="
RedirectToRouteResult
.PreserveMethod"/>
1411
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
1429
/// <see cref="
RedirectToRouteResult
.Permanent"/> set to true and <see cref="
RedirectToRouteResult
.PreserveMethod"/>
1436
/// <returns>The created <see cref="
RedirectToRouteResult
"/> for the response.</returns>
Microsoft.AspNetCore.Mvc.RazorPages.Test (64)
PageModelTest.cs (32)
703
var
resultTemporary = pageModel.RedirectToRoute(routeValues);
706
Assert.IsType<
RedirectToRouteResult
>(resultTemporary);
722
var
resultTemporary = pageModel.RedirectToRoutePreserveMethod(routeValues: routeValues);
725
Assert.IsType<
RedirectToRouteResult
>(resultTemporary);
743
var
result = pageModel.RedirectToRoute("TestRoute", routeValues, "test");
746
Assert.IsType<
RedirectToRouteResult
>(result);
766
var
result = pageModel.RedirectToRoutePreserveMethod(routeName: "TestRoute", routeValues: routeValues, fragment: "test");
769
Assert.IsType<
RedirectToRouteResult
>(result);
787
var
resultPermanent = pageModel.RedirectToRoutePermanent(routeValues);
790
Assert.IsType<
RedirectToRouteResult
>(resultPermanent);
806
var
resultPermanent = pageModel.RedirectToRoutePermanentPreserveMethod(routeValues: routeValues);
809
Assert.IsType<
RedirectToRouteResult
>(resultPermanent);
827
var
result = pageModel.RedirectToRoutePermanent("TestRoute", routeValues, "test");
830
Assert.IsType<
RedirectToRouteResult
>(result);
850
var
result = pageModel.RedirectToRoutePermanentPreserveMethod(routeName: "TestRoute", routeValues: routeValues, fragment: "test");
853
Assert.IsType<
RedirectToRouteResult
>(result);
869
var
resultTemporary = pageModel.RedirectToRoute(routeName);
872
Assert.IsType<
RedirectToRouteResult
>(resultTemporary);
886
var
resultTemporary = pageModel.RedirectToRoutePreserveMethod(routeName: routeName);
889
Assert.IsType<
RedirectToRouteResult
>(resultTemporary);
903
var
resultPermanent = pageModel.RedirectToRoutePermanent(routeName);
906
Assert.IsType<
RedirectToRouteResult
>(resultPermanent);
920
var
resultPermanent = pageModel.RedirectToRoutePermanentPreserveMethod(routeName: routeName);
923
Assert.IsType<
RedirectToRouteResult
>(resultPermanent);
1298
var
resultTemporary = pageModel.RedirectToRoute(routeName, routeValues);
1301
Assert.IsType<
RedirectToRouteResult
>(resultTemporary);
1319
var
resultTemporary = pageModel.RedirectToRoutePreserveMethod(routeName: routeName, routeValues: routeValues);
1322
Assert.IsType<
RedirectToRouteResult
>(resultTemporary);
1340
var
resultPermanent = pageModel.RedirectToRoutePermanent(routeName, routeValues);
1343
Assert.IsType<
RedirectToRouteResult
>(resultPermanent);
1361
var
resultPermanent = pageModel.RedirectToRoutePermanentPreserveMethod(routeName: routeName, routeValues: routeValues);
1364
Assert.IsType<
RedirectToRouteResult
>(resultPermanent);
PageTest.cs (32)
723
var
resultTemporary = page.RedirectToRoute(routeValues);
726
Assert.IsType<
RedirectToRouteResult
>(resultTemporary);
742
var
resultTemporary = page.RedirectToRoutePreserveMethod(routeValues: routeValues);
745
Assert.IsType<
RedirectToRouteResult
>(resultTemporary);
763
var
result = page.RedirectToRoute("TestRoute", routeValues, "test");
766
Assert.IsType<
RedirectToRouteResult
>(result);
786
var
result = page.RedirectToRoutePreserveMethod(routeName: "TestRoute", routeValues: routeValues, fragment: "test");
789
Assert.IsType<
RedirectToRouteResult
>(result);
807
var
resultPermanent = page.RedirectToRoutePermanent(routeValues);
810
Assert.IsType<
RedirectToRouteResult
>(resultPermanent);
826
var
resultPermanent = page.RedirectToRoutePermanentPreserveMethod(routeValues: routeValues);
829
Assert.IsType<
RedirectToRouteResult
>(resultPermanent);
847
var
result = page.RedirectToRoutePermanent("TestRoute", routeValues, "test");
850
Assert.IsType<
RedirectToRouteResult
>(result);
870
var
result = page.RedirectToRoutePermanentPreserveMethod(routeName: "TestRoute", routeValues: routeValues, fragment: "test");
873
Assert.IsType<
RedirectToRouteResult
>(result);
889
var
resultTemporary = page.RedirectToRoute(routeName);
892
Assert.IsType<
RedirectToRouteResult
>(resultTemporary);
906
var
resultTemporary = page.RedirectToRoutePreserveMethod(routeName: routeName);
909
Assert.IsType<
RedirectToRouteResult
>(resultTemporary);
923
var
resultPermanent = page.RedirectToRoutePermanent(routeName);
926
Assert.IsType<
RedirectToRouteResult
>(resultPermanent);
940
var
resultPermanent = page.RedirectToRoutePermanentPreserveMethod(routeName: routeName);
943
Assert.IsType<
RedirectToRouteResult
>(resultPermanent);
960
var
resultTemporary = page.RedirectToRoute(routeName, routeValues);
963
Assert.IsType<
RedirectToRouteResult
>(resultTemporary);
981
var
resultTemporary = page.RedirectToRoutePreserveMethod(routeName: routeName, routeValues: routeValues);
984
Assert.IsType<
RedirectToRouteResult
>(resultTemporary);
1002
var
resultPermanent = page.RedirectToRoutePermanent(routeName, routeValues);
1005
Assert.IsType<
RedirectToRouteResult
>(resultPermanent);
1023
var
resultPermanent = page.RedirectToRoutePermanentPreserveMethod(routeName: routeName, routeValues: routeValues);
1026
Assert.IsType<
RedirectToRouteResult
>(resultPermanent);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (3)
ControllerUnitTestabilityTests.cs (3)
482
var
redirectToRouteResult = Assert.IsType<
RedirectToRouteResult
>(result);
496
redirectToRouteResult = Assert.IsType<
RedirectToRouteResult
>(result);