18 instantiations of RedirectToPageResult
Microsoft.AspNetCore.Mvc.Core (4)
ControllerBase.cs (4)
944
=> new
RedirectToPageResult
(pageName, pageHandler, routeValues, fragment);
1004
=> new
RedirectToPageResult
(pageName, pageHandler, routeValues, permanent: true, fragment: fragment);
1025
return new
RedirectToPageResult
(
1053
return new
RedirectToPageResult
(
Microsoft.AspNetCore.Mvc.Core.Test (6)
RedirectToPageResultTest.cs (6)
31
var result = new
RedirectToPageResult
("/some-page", new Dictionary<string, object>())
63
var result = new
RedirectToPageResult
("/MyPage", null, new { id = 10, test = "value" }, permanentRedirect)
100
var result = new
RedirectToPageResult
("./", "page-handler", values, true, "test-fragment")
154
var result = new
RedirectToPageResult
("/MyPage", "page-handler", values, true, "test-fragment")
218
var result = new
RedirectToPageResult
(pageName)
269
var result = new
RedirectToPageResult
(pageName)
Microsoft.AspNetCore.Mvc.RazorPages (8)
PageBase.cs (4)
986
=> new
RedirectToPageResult
(pageName, pageHandler, routeValues, fragment);
1048
=> new
RedirectToPageResult
(pageName, pageHandler, routeValues, permanent: true, fragment: fragment);
1066
return new
RedirectToPageResult
(
1091
return new
RedirectToPageResult
(
PageModel.cs (4)
1328
=> new
RedirectToPageResult
(pageName, pageHandler, routeValues, fragment);
1400
=> new
RedirectToPageResult
(pageName, pageHandler, routeValues, permanent: true, fragment: fragment);
1418
return new
RedirectToPageResult
(
1443
return new
RedirectToPageResult
(
214 references to RedirectToPageResult
Microsoft.AspNetCore.Mvc.Core (43)
ControllerBase.cs (29)
883
/// <returns>The <see cref="
RedirectToPageResult
"/>.</returns>
885
public virtual
RedirectToPageResult
RedirectToPage(string pageName)
894
/// <returns>The <see cref="
RedirectToPageResult
"/>.</returns>
896
public virtual
RedirectToPageResult
RedirectToPage(string pageName, object? routeValues)
905
/// <returns>The <see cref="
RedirectToPageResult
"/>.</returns>
907
public virtual
RedirectToPageResult
RedirectToPage(string pageName, string? pageHandler)
916
/// <returns>The <see cref="
RedirectToPageResult
"/>.</returns>
918
public virtual
RedirectToPageResult
RedirectToPage(string pageName, string? pageHandler, object? routeValues)
928
/// <returns>The <see cref="
RedirectToPageResult
"/>.</returns>
930
public virtual
RedirectToPageResult
RedirectToPage(string pageName, string? pageHandler, string? fragment)
941
/// <returns>The <see cref="
RedirectToPageResult
"/>.</returns>
943
public virtual
RedirectToPageResult
RedirectToPage(string pageName, string? pageHandler, object? routeValues, string? fragment)
950
/// <returns>The <see cref="
RedirectToPageResult
"/> with <see cref="
RedirectToPageResult
.Permanent"/> set.</returns>
952
public virtual
RedirectToPageResult
RedirectToPagePermanent(string pageName)
961
/// <returns>The <see cref="
RedirectToPageResult
"/> with <see cref="
RedirectToPageResult
.Permanent"/> set.</returns>
963
public virtual
RedirectToPageResult
RedirectToPagePermanent(string pageName, object? routeValues)
972
/// <returns>The <see cref="
RedirectToPageResult
"/> with <see cref="
RedirectToPageResult
.Permanent"/> set.</returns>
974
public virtual
RedirectToPageResult
RedirectToPagePermanent(string pageName, string? pageHandler)
984
/// <returns>The <see cref="
RedirectToPageResult
"/> with <see cref="
RedirectToPageResult
.Permanent"/> set.</returns>
986
public virtual
RedirectToPageResult
RedirectToPagePermanent(string pageName, string? pageHandler, string? fragment)
997
/// <returns>The <see cref="
RedirectToPageResult
"/> with <see cref="
RedirectToPageResult
.Permanent"/> set.</returns>
999
public virtual
RedirectToPageResult
RedirectToPagePermanent(
1017
public virtual
RedirectToPageResult
RedirectToPagePreserveMethod(
1045
public virtual
RedirectToPageResult
RedirectToPagePermanentPreserveMethod(
DependencyInjection\MvcCoreServiceCollectionExtensions.cs (1)
244
services.TryAddSingleton<IActionResultExecutor<
RedirectToPageResult
>, RedirectToPageResultExecutor>();
Infrastructure\RedirectToPageResultExecutor.cs (3)
12
/// A <see cref="IActionResultExecutor{RedirectToPageResult}"/> for <see cref="
RedirectToPageResult
"/>.
14
public partial class RedirectToPageResultExecutor : IActionResultExecutor<
RedirectToPageResult
>
34
public virtual Task ExecuteAsync(ActionContext context,
RedirectToPageResult
result)
RedirectToPageResult.cs (10)
19
/// Initializes a new instance of the <see cref="
RedirectToPageResult
"/> with the values
29
/// Initializes a new instance of the <see cref="
RedirectToPageResult
"/> with the values
40
/// Initializes a new instance of the <see cref="
RedirectToPageResult
"/> with the values
51
/// Initializes a new instance of the <see cref="
RedirectToPageResult
"/> with the values
63
/// Initializes a new instance of the <see cref="
RedirectToPageResult
"/> with the values
80
/// Initializes a new instance of the <see cref="
RedirectToPageResult
"/> with the values provided.
98
/// Initializes a new instance of the <see cref="
RedirectToPageResult
"/> with the values
115
/// Initializes a new instance of the <see cref="
RedirectToPageResult
"/> with the values
134
/// Initializes a new instance of the <see cref="
RedirectToPageResult
"/> with the values
209
var executor = context.HttpContext.RequestServices.GetRequiredService<IActionResultExecutor<
RedirectToPageResult
>>();
Microsoft.AspNetCore.Mvc.Core.Test (34)
ControllerBaseTest.cs (27)
1009
var
result = controller.RedirectToPage(pageName);
1012
Assert.IsType<
RedirectToPageResult
>(result);
1025
var
result = controller.RedirectToPage(pageName, pageHandler);
1028
Assert.IsType<
RedirectToPageResult
>(result);
1042
var
result = controller.RedirectToPage(pageName, routeValues);
1045
Assert.IsType<
RedirectToPageResult
>(result);
1066
var
result = controller.RedirectToPage(pageName, pageHandler, fragment);
1069
Assert.IsType<
RedirectToPageResult
>(result);
1086
var
result = controller.RedirectToPage(pageName, pageHandler, routeValues, fragment);
1089
Assert.IsType<
RedirectToPageResult
>(result);
1110
var
result = controller.RedirectToPagePermanent(pageName);
1113
Assert.IsType<
RedirectToPageResult
>(result);
1127
var
result = controller.RedirectToPagePermanent(pageName, pageHandler);
1130
Assert.IsType<
RedirectToPageResult
>(result);
1145
var
result = controller.RedirectToPagePermanent(pageName, routeValues);
1148
Assert.IsType<
RedirectToPageResult
>(result);
1170
var
result = controller.RedirectToPagePermanent(pageName, pageHandler, fragment);
1173
Assert.IsType<
RedirectToPageResult
>(result);
1191
var
result = controller.RedirectToPagePermanent(pageName, pageHandler, routeValues, fragment);
1194
Assert.IsType<
RedirectToPageResult
>(result);
1216
var
result = pageModel.RedirectToPagePreserveMethod(url);
1219
Assert.IsType<
RedirectToPageResult
>(result);
1236
var
resultPermanent = pageModel.RedirectToPagePreserveMethod(pageName, routeValues: routeValues);
1239
Assert.IsType<
RedirectToPageResult
>(resultPermanent);
1257
var
resultPermanent = pageModel.RedirectToPagePermanentPreserveMethod(routeName, routeValues: routeValues);
1260
Assert.IsType<
RedirectToPageResult
>(resultPermanent);
3181
var
result = controller.RedirectToPage("page", "handler", new { test = "value" });
RedirectToPageResultTest.cs (7)
31
var
result = new RedirectToPageResult("/some-page", new Dictionary<string, object>())
63
var
result = new RedirectToPageResult("/MyPage", null, new { id = 10, test = "value" }, permanentRedirect)
100
var
result = new RedirectToPageResult("./", "page-handler", values, true, "test-fragment")
154
var
result = new RedirectToPageResult("/MyPage", "page-handler", values, true, "test-fragment")
218
var
result = new RedirectToPageResult(pageName)
269
var
result = new RedirectToPageResult(pageName)
295
services.AddSingleton<IActionResultExecutor<
RedirectToPageResult
>, RedirectToPageResultExecutor>();
Microsoft.AspNetCore.Mvc.RazorPages (73)
PageBase.cs (34)
925
/// <returns>The <see cref="
RedirectToPageResult
"/>.</returns>
926
public virtual
RedirectToPageResult
RedirectToPage()
933
/// <returns>The <see cref="
RedirectToPageResult
"/>.</returns>
934
public virtual
RedirectToPageResult
RedirectToPage(object? routeValues)
941
/// <returns>The <see cref="
RedirectToPageResult
"/>.</returns>
942
public virtual
RedirectToPageResult
RedirectToPage(string? pageName)
951
/// <returns>The <see cref="
RedirectToPageResult
"/>.</returns>
952
public virtual
RedirectToPageResult
RedirectToPage(string? pageName, string? pageHandler)
961
/// <returns>The <see cref="
RedirectToPageResult
"/>.</returns>
962
public virtual
RedirectToPageResult
RedirectToPage(string? pageName, object? routeValues)
972
/// <returns>The <see cref="
RedirectToPageResult
"/>.</returns>
973
public virtual
RedirectToPageResult
RedirectToPage(string? pageName, string? pageHandler, string? fragment)
984
/// <returns>The <see cref="
RedirectToPageResult
"/>.</returns>
985
public virtual
RedirectToPageResult
RedirectToPage(string? pageName, string? pageHandler, object? routeValues, string? fragment)
992
/// <returns>The <see cref="
RedirectToPageResult
"/> with <see cref="
RedirectToPageResult
.Permanent"/> set.</returns>
993
public virtual
RedirectToPageResult
RedirectToPagePermanent(string? pageName)
1002
/// <returns>The <see cref="
RedirectToPageResult
"/> with <see cref="
RedirectToPageResult
.Permanent"/> set.</returns>
1003
public virtual
RedirectToPageResult
RedirectToPagePermanent(string? pageName, object? routeValues)
1012
/// <returns>The <see cref="
RedirectToPageResult
"/> with <see cref="
RedirectToPageResult
.Permanent"/> set.</returns>
1013
public virtual
RedirectToPageResult
RedirectToPagePermanent(string? pageName, string? pageHandler)
1023
/// <returns>The <see cref="
RedirectToPageResult
"/> with <see cref="
RedirectToPageResult
.Permanent"/> set.</returns>
1024
public virtual
RedirectToPageResult
RedirectToPagePermanent(string? pageName, string? pageHandler, object? routeValues)
1034
/// <returns>The <see cref="
RedirectToPageResult
"/> with <see cref="
RedirectToPageResult
.Permanent"/> set.</returns>
1035
public virtual
RedirectToPageResult
RedirectToPagePermanent(string? pageName, string? pageHandler, string? fragment)
1046
/// <returns>The <see cref="
RedirectToPageResult
"/> with <see cref="
RedirectToPageResult
.Permanent"/> set.</returns>
1047
public virtual
RedirectToPageResult
RedirectToPagePermanent(string? pageName, string? pageHandler, object? routeValues, string? fragment)
1060
public virtual
RedirectToPageResult
RedirectToPagePreserveMethod(
1085
public virtual
RedirectToPageResult
RedirectToPagePermanentPreserveMethod(
PageModel.cs (39)
1256
/// <returns>The <see cref="
RedirectToPageResult
"/>.</returns>
1257
public virtual
RedirectToPageResult
RedirectToPage()
1264
/// <returns>The <see cref="
RedirectToPageResult
"/>.</returns>
1265
public virtual
RedirectToPageResult
RedirectToPage(object? routeValues)
1272
/// <returns>The <see cref="
RedirectToPageResult
"/>.</returns>
1273
public virtual
RedirectToPageResult
RedirectToPage(string? pageName)
1282
/// <returns>The <see cref="
RedirectToPageResult
"/>.</returns>
1283
public virtual
RedirectToPageResult
RedirectToPage(string? pageName, string? pageHandler)
1293
/// <returns>The <see cref="
RedirectToPageResult
"/>.</returns>
1294
public virtual
RedirectToPageResult
RedirectToPage(string? pageName, string? pageHandler, object? routeValues)
1303
/// <returns>The <see cref="
RedirectToPageResult
"/>.</returns>
1304
public virtual
RedirectToPageResult
RedirectToPage(string? pageName, object? routeValues)
1314
/// <returns>The <see cref="
RedirectToPageResult
"/>.</returns>
1315
public virtual
RedirectToPageResult
RedirectToPage(string? pageName, string? pageHandler, string? fragment)
1326
/// <returns>The <see cref="
RedirectToPageResult
"/>.</returns>
1327
public virtual
RedirectToPageResult
RedirectToPage(string? pageName, string? pageHandler, object? routeValues, string? fragment)
1334
/// <returns>The <see cref="
RedirectToPageResult
"/> with <see cref="
RedirectToPageResult
.Permanent"/> set.</returns>
1335
public virtual
RedirectToPageResult
RedirectToPagePermanent(string? pageName)
1344
/// <returns>The <see cref="
RedirectToPageResult
"/> with <see cref="
RedirectToPageResult
.Permanent"/> set.</returns>
1345
public virtual
RedirectToPageResult
RedirectToPagePermanent(string? pageName, object? routeValues)
1353
/// <returns>The <see cref="
RedirectToPageResult
"/> with <see cref="
RedirectToPageResult
.Permanent"/> set.</returns>
1354
public virtual
RedirectToPageResult
RedirectToPagePermanent(string? pageName, string? pageHandler)
1364
/// <returns>The <see cref="
RedirectToPageResult
"/> with <see cref="
RedirectToPageResult
.Permanent"/> set.</returns>
1365
public virtual
RedirectToPageResult
RedirectToPagePermanent(string? pageName, string? pageHandler, object? routeValues)
1375
/// <returns>The <see cref="
RedirectToPageResult
"/> with <see cref="
RedirectToPageResult
.Permanent"/> set.</returns>
1376
public virtual
RedirectToPageResult
RedirectToPagePermanent(string? pageName, string? pageHandler, string? fragment)
1386
/// <returns>The <see cref="
RedirectToPageResult
"/> with <see cref="
RedirectToPageResult
.Permanent"/> set.</returns>
1387
public virtual
RedirectToPageResult
RedirectToPagePermanent(string? pageName, object? routeValues, string? fragment)
1398
/// <returns>The <see cref="
RedirectToPageResult
"/> with <see cref="
RedirectToPageResult
.Permanent"/> set.</returns>
1399
public virtual
RedirectToPageResult
RedirectToPagePermanent(string? pageName, string? pageHandler, object? routeValues, string? fragment)
1412
public virtual
RedirectToPageResult
RedirectToPagePreserveMethod(
1437
public virtual
RedirectToPageResult
RedirectToPagePermanentPreserveMethod(
Microsoft.AspNetCore.Mvc.RazorPages.Test (64)
PageModelTest.cs (32)
966
var
result = pageModel.RedirectToPage();
969
Assert.IsType<
RedirectToPageResult
>(result);
981
var
result = pageModel.RedirectToPage(pageName);
984
Assert.IsType<
RedirectToPageResult
>(result);
996
var
result = pageModel.RedirectToPage(routeValues);
999
Assert.IsType<
RedirectToPageResult
>(result);
1019
var
result = pageModel.RedirectToPage(pageName, pageHandler);
1022
Assert.IsType<
RedirectToPageResult
>(result);
1036
var
result = pageModel.RedirectToPage(pageName, routeValues);
1039
Assert.IsType<
RedirectToPageResult
>(result);
1060
var
result = pageModel.RedirectToPage(pageName, pageHandler, fragment);
1063
Assert.IsType<
RedirectToPageResult
>(result);
1080
var
result = pageModel.RedirectToPage(pageName, pageHandler, routeValues, fragment);
1083
Assert.IsType<
RedirectToPageResult
>(result);
1104
var
result = pageModel.RedirectToPagePermanent(pageName);
1107
Assert.IsType<
RedirectToPageResult
>(result);
1121
var
result = pageModel.RedirectToPagePermanent(pageName, pageHandler);
1124
Assert.IsType<
RedirectToPageResult
>(result);
1139
var
result = pageModel.RedirectToPagePermanent(pageName, routeValues);
1142
Assert.IsType<
RedirectToPageResult
>(result);
1164
var
result = pageModel.RedirectToPagePermanent(pageName, pageHandler, routeValues);
1167
Assert.IsType<
RedirectToPageResult
>(result);
1190
var
result = pageModel.RedirectToPagePermanent(pageName, pageHandler, fragment);
1193
Assert.IsType<
RedirectToPageResult
>(result);
1211
var
result = pageModel.RedirectToPagePermanent(pageName, pageHandler, routeValues, fragment);
1214
Assert.IsType<
RedirectToPageResult
>(result);
1236
var
result = pageModel.RedirectToPagePreserveMethod(url);
1239
Assert.IsType<
RedirectToPageResult
>(result);
1256
var
resultPermanent = pageModel.RedirectToPagePreserveMethod(pageName, routeValues: routeValues);
1259
Assert.IsType<
RedirectToPageResult
>(resultPermanent);
1277
var
resultPermanent = pageModel.RedirectToPagePermanentPreserveMethod(routeName, routeValues: routeValues);
1280
Assert.IsType<
RedirectToPageResult
>(resultPermanent);
PageTest.cs (32)
1040
var
result = page.RedirectToPage();
1043
Assert.IsType<
RedirectToPageResult
>(result);
1055
var
result = page.RedirectToPage(pageName);
1058
Assert.IsType<
RedirectToPageResult
>(result);
1070
var
result = page.RedirectToPage(routeValues);
1073
Assert.IsType<
RedirectToPageResult
>(result);
1093
var
result = page.RedirectToPage(pageName, pageHandler);
1096
Assert.IsType<
RedirectToPageResult
>(result);
1110
var
result = page.RedirectToPage(pageName, routeValues);
1113
Assert.IsType<
RedirectToPageResult
>(result);
1134
var
result = page.RedirectToPage(pageName, pageHandler, fragment);
1137
Assert.IsType<
RedirectToPageResult
>(result);
1154
var
result = page.RedirectToPage(pageName, pageHandler, routeValues, fragment);
1157
Assert.IsType<
RedirectToPageResult
>(result);
1178
var
result = page.RedirectToPagePermanent(pageName);
1181
Assert.IsType<
RedirectToPageResult
>(result);
1195
var
result = page.RedirectToPagePermanent(pageName, pageHandler);
1198
Assert.IsType<
RedirectToPageResult
>(result);
1213
var
result = page.RedirectToPagePermanent(pageName, routeValues);
1216
Assert.IsType<
RedirectToPageResult
>(result);
1238
var
result = page.RedirectToPagePermanent(pageName, pageHandler, routeValues);
1241
Assert.IsType<
RedirectToPageResult
>(result);
1264
var
result = page.RedirectToPagePermanent(pageName, pageHandler, fragment);
1267
Assert.IsType<
RedirectToPageResult
>(result);
1285
var
result = page.RedirectToPagePermanent(pageName, pageHandler, routeValues, fragment);
1288
Assert.IsType<
RedirectToPageResult
>(result);
1310
var
result = pageModel.RedirectToPagePreserveMethod(url);
1313
Assert.IsType<
RedirectToPageResult
>(result);
1330
var
resultPermanent = pageModel.RedirectToPagePreserveMethod(pageName, routeValues: routeValues);
1333
Assert.IsType<
RedirectToPageResult
>(resultPermanent);
1351
var
resultPermanent = pageModel.RedirectToPagePermanentPreserveMethod(routeName, routeValues: routeValues);
1354
Assert.IsType<
RedirectToPageResult
>(resultPermanent);