18 instantiations of LocalRedirectResult
Microsoft.AspNetCore.Mvc.Core (4)
ControllerBase.cs (4)
390
return new
LocalRedirectResult
(localUrl);
404
return new
LocalRedirectResult
(localUrl, permanent: true);
419
return new
LocalRedirectResult
(localUrl: localUrl, permanent: false, preserveMethod: true);
434
return new
LocalRedirectResult
(localUrl: localUrl, permanent: true, preserveMethod: true);
Microsoft.AspNetCore.Mvc.Core.Test (6)
LocalRedirectResultTest.cs (6)
24
var result = new
LocalRedirectResult
(url);
39
var result = new
LocalRedirectResult
(url, permanent: true);
54
var result = new
LocalRedirectResult
(url, permanent: true, preserveMethod: true);
72
var result = new
LocalRedirectResult
(contentPath);
96
var result = new
LocalRedirectResult
(contentPath);
118
var result = new
LocalRedirectResult
(contentPath);
Microsoft.AspNetCore.Mvc.RazorPages (8)
PageBase.cs (4)
415
return new
LocalRedirectResult
(localUrl);
428
return new
LocalRedirectResult
(localUrl, permanent: true);
442
return new
LocalRedirectResult
(localUrl: localUrl, permanent: false, preserveMethod: true);
456
return new
LocalRedirectResult
(localUrl: localUrl, permanent: true, preserveMethod: true);
PageModel.cs (4)
722
return new
LocalRedirectResult
(localUrl);
735
return new
LocalRedirectResult
(localUrl, permanent: true);
749
return new
LocalRedirectResult
(localUrl: localUrl, permanent: false, preserveMethod: true);
763
return new
LocalRedirectResult
(localUrl: localUrl, permanent: true, preserveMethod: true);
90 references to LocalRedirectResult
Microsoft.AspNetCore.Mvc.Core (25)
ControllerBase.cs (17)
380
/// Creates a <see cref="
LocalRedirectResult
"/> object that redirects
384
/// <returns>The created <see cref="
LocalRedirectResult
"/> for the response.</returns>
386
public virtual
LocalRedirectResult
LocalRedirect([StringSyntax(StringSyntaxAttribute.Uri, UriKind.Relative)] string localUrl)
394
/// Creates a <see cref="
LocalRedirectResult
"/> object with <see cref="
LocalRedirectResult
.Permanent"/> set to
398
/// <returns>The created <see cref="
LocalRedirectResult
"/> for the response.</returns>
400
public virtual
LocalRedirectResult
LocalRedirectPermanent([StringSyntax(StringSyntaxAttribute.Uri, UriKind.Relative)] string localUrl)
408
/// Creates a <see cref="
LocalRedirectResult
"/> object with <see cref="
LocalRedirectResult
.Permanent"/> set to
409
/// false and <see cref="
LocalRedirectResult
.PreserveMethod"/> set to true
413
/// <returns>The created <see cref="
LocalRedirectResult
"/> for the response.</returns>
415
public virtual
LocalRedirectResult
LocalRedirectPreserveMethod([StringSyntax(StringSyntaxAttribute.Uri, UriKind.Relative)] string localUrl)
423
/// Creates a <see cref="
LocalRedirectResult
"/> object with <see cref="
LocalRedirectResult
.Permanent"/> set to
424
/// true and <see cref="
LocalRedirectResult
.PreserveMethod"/> set to true
428
/// <returns>The created <see cref="
LocalRedirectResult
"/> for the response.</returns>
430
public virtual
LocalRedirectResult
LocalRedirectPermanentPreserveMethod([StringSyntax(StringSyntaxAttribute.Uri, UriKind.Relative)] string localUrl)
DependencyInjection\MvcCoreServiceCollectionExtensions.cs (1)
241
services.TryAddSingleton<IActionResultExecutor<
LocalRedirectResult
>, LocalRedirectResultExecutor>();
Infrastructure\LocalRedirectResultExecutor.cs (3)
14
/// A <see cref="IActionResultExecutor{LocalRedirectResult}"/> that handles <see cref="
LocalRedirectResult
"/>.
16
public partial class LocalRedirectResultExecutor : IActionResultExecutor<
LocalRedirectResult
>
36
public virtual Task ExecuteAsync(ActionContext context,
LocalRedirectResult
result)
LocalRedirectResult.cs (4)
19
/// Initializes a new instance of the <see cref="
LocalRedirectResult
"/> class with the values
29
/// Initializes a new instance of the <see cref="
LocalRedirectResult
"/> class with the values
40
/// Initializes a new instance of the <see cref="
LocalRedirectResult
"/> class with the values
91
var executor = context.HttpContext.RequestServices.GetRequiredService<IActionResultExecutor<
LocalRedirectResult
>>();
Microsoft.AspNetCore.Mvc.Core.Test (15)
ControllerBaseTest.cs (8)
146
var
result = controller.LocalRedirect(url);
149
Assert.IsType<
LocalRedirectResult
>(result);
163
var
result = controller.LocalRedirectPermanent(url);
166
Assert.IsType<
LocalRedirectResult
>(result);
180
var
result = controller.LocalRedirectPreserveMethod(url);
183
Assert.IsType<
LocalRedirectResult
>(result);
197
var
result = controller.LocalRedirectPermanentPreserveMethod(url);
200
Assert.IsType<
LocalRedirectResult
>(result);
LocalRedirectResultTest.cs (7)
24
var
result = new LocalRedirectResult(url);
39
var
result = new LocalRedirectResult(url, permanent: true);
54
var
result = new LocalRedirectResult(url, permanent: true, preserveMethod: true);
72
var
result = new LocalRedirectResult(contentPath);
96
var
result = new LocalRedirectResult(contentPath);
118
var
result = new LocalRedirectResult(contentPath);
139
serviceCollection.AddSingleton<IActionResultExecutor<
LocalRedirectResult
>, LocalRedirectResultExecutor>();
Microsoft.AspNetCore.Mvc.RazorPages (34)
PageBase.cs (17)
406
/// Creates a <see cref="
LocalRedirectResult
"/> object that redirects
410
/// <returns>The created <see cref="
LocalRedirectResult
"/> for the response.</returns>
411
public virtual
LocalRedirectResult
LocalRedirect([StringSyntax(StringSyntaxAttribute.Uri, UriKind.Relative)] string localUrl)
419
/// Creates a <see cref="
LocalRedirectResult
"/> object with <see cref="
LocalRedirectResult
.Permanent"/> set to
423
/// <returns>The created <see cref="
LocalRedirectResult
"/> for the response.</returns>
424
public virtual
LocalRedirectResult
LocalRedirectPermanent([StringSyntax(StringSyntaxAttribute.Uri, UriKind.Relative)] string localUrl)
432
/// Creates a <see cref="
LocalRedirectResult
"/> object with <see cref="
LocalRedirectResult
.Permanent"/> set to
433
/// false and <see cref="
LocalRedirectResult
.PreserveMethod"/> set to true
437
/// <returns>The created <see cref="
LocalRedirectResult
"/> for the response.</returns>
438
public virtual
LocalRedirectResult
LocalRedirectPreserveMethod([StringSyntax(StringSyntaxAttribute.Uri, UriKind.Relative)] string localUrl)
446
/// Creates a <see cref="
LocalRedirectResult
"/> object with <see cref="
LocalRedirectResult
.Permanent"/> set to
447
/// true and <see cref="
LocalRedirectResult
.PreserveMethod"/> set to true
451
/// <returns>The created <see cref="
LocalRedirectResult
"/> for the response.</returns>
452
public virtual
LocalRedirectResult
LocalRedirectPermanentPreserveMethod([StringSyntax(StringSyntaxAttribute.Uri, UriKind.Relative)] string localUrl)
PageModel.cs (17)
713
/// Creates a <see cref="
LocalRedirectResult
"/> object that redirects
717
/// <returns>The created <see cref="
LocalRedirectResult
"/> for the response.</returns>
718
public virtual
LocalRedirectResult
LocalRedirect([StringSyntax(StringSyntaxAttribute.Uri, UriKind.Relative)] string localUrl)
726
/// Creates a <see cref="
LocalRedirectResult
"/> object with <see cref="
LocalRedirectResult
.Permanent"/> set to
730
/// <returns>The created <see cref="
LocalRedirectResult
"/> for the response.</returns>
731
public virtual
LocalRedirectResult
LocalRedirectPermanent([StringSyntax(StringSyntaxAttribute.Uri, UriKind.Relative)] string localUrl)
739
/// Creates a <see cref="
LocalRedirectResult
"/> object with <see cref="
LocalRedirectResult
.Permanent"/> set to
740
/// false and <see cref="
LocalRedirectResult
.PreserveMethod"/> set to true
744
/// <returns>The created <see cref="
LocalRedirectResult
"/> for the response.</returns>
745
public virtual
LocalRedirectResult
LocalRedirectPreserveMethod([StringSyntax(StringSyntaxAttribute.Uri, UriKind.Relative)] string localUrl)
753
/// Creates a <see cref="
LocalRedirectResult
"/> object with <see cref="
LocalRedirectResult
.Permanent"/> set to
754
/// true and <see cref="
LocalRedirectResult
.PreserveMethod"/> set to true
758
/// <returns>The created <see cref="
LocalRedirectResult
"/> for the response.</returns>
759
public virtual
LocalRedirectResult
LocalRedirectPermanentPreserveMethod([StringSyntax(StringSyntaxAttribute.Uri, UriKind.Relative)] string localUrl)
Microsoft.AspNetCore.Mvc.RazorPages.Test (16)
PageModelTest.cs (8)
137
var
result = pageModel.LocalRedirect(url);
140
Assert.IsType<
LocalRedirectResult
>(result);
154
var
result = pageModel.LocalRedirectPermanent(url);
157
Assert.IsType<
LocalRedirectResult
>(result);
171
var
result = pageModel.LocalRedirectPreserveMethod(url);
174
Assert.IsType<
LocalRedirectResult
>(result);
188
var
result = pageModel.LocalRedirectPermanentPreserveMethod(url);
191
Assert.IsType<
LocalRedirectResult
>(result);
PageTest.cs (8)
157
var
result = page.LocalRedirect(url);
160
Assert.IsType<
LocalRedirectResult
>(result);
174
var
result = page.LocalRedirectPermanent(url);
177
Assert.IsType<
LocalRedirectResult
>(result);
191
var
result = page.LocalRedirectPreserveMethod(url);
194
Assert.IsType<
LocalRedirectResult
>(result);
208
var
result = page.LocalRedirectPermanentPreserveMethod(url);
211
Assert.IsType<
LocalRedirectResult
>(result);