18 instantiations of LocalRedirectResult
Microsoft.AspNetCore.Mvc.Core (4)
ControllerBase.cs (4)
390return new LocalRedirectResult(localUrl); 404return new LocalRedirectResult(localUrl, permanent: true); 419return new LocalRedirectResult(localUrl: localUrl, permanent: false, preserveMethod: true); 434return new LocalRedirectResult(localUrl: localUrl, permanent: true, preserveMethod: true);
Microsoft.AspNetCore.Mvc.Core.Test (6)
LocalRedirectResultTest.cs (6)
24var result = new LocalRedirectResult(url); 39var result = new LocalRedirectResult(url, permanent: true); 54var result = new LocalRedirectResult(url, permanent: true, preserveMethod: true); 72var result = new LocalRedirectResult(contentPath); 96var result = new LocalRedirectResult(contentPath); 118var result = new LocalRedirectResult(contentPath);
Microsoft.AspNetCore.Mvc.RazorPages (8)
PageBase.cs (4)
415return new LocalRedirectResult(localUrl); 428return new LocalRedirectResult(localUrl, permanent: true); 442return new LocalRedirectResult(localUrl: localUrl, permanent: false, preserveMethod: true); 456return new LocalRedirectResult(localUrl: localUrl, permanent: true, preserveMethod: true);
PageModel.cs (4)
722return new LocalRedirectResult(localUrl); 735return new LocalRedirectResult(localUrl, permanent: true); 749return new LocalRedirectResult(localUrl: localUrl, permanent: false, preserveMethod: true); 763return 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> 386public 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> 400public 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> 415public 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> 430public virtual LocalRedirectResult LocalRedirectPermanentPreserveMethod([StringSyntax(StringSyntaxAttribute.Uri, UriKind.Relative)] string localUrl)
DependencyInjection\MvcCoreServiceCollectionExtensions.cs (1)
241services.TryAddSingleton<IActionResultExecutor<LocalRedirectResult>, LocalRedirectResultExecutor>();
Infrastructure\LocalRedirectResultExecutor.cs (3)
14/// A <see cref="IActionResultExecutor{LocalRedirectResult}"/> that handles <see cref="LocalRedirectResult"/>. 16public partial class LocalRedirectResultExecutor : IActionResultExecutor<LocalRedirectResult> 36public 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 91var executor = context.HttpContext.RequestServices.GetRequiredService<IActionResultExecutor<LocalRedirectResult>>();
Microsoft.AspNetCore.Mvc.Core.Test (15)
ControllerBaseTest.cs (8)
146var result = controller.LocalRedirect(url); 149Assert.IsType<LocalRedirectResult>(result); 163var result = controller.LocalRedirectPermanent(url); 166Assert.IsType<LocalRedirectResult>(result); 180var result = controller.LocalRedirectPreserveMethod(url); 183Assert.IsType<LocalRedirectResult>(result); 197var result = controller.LocalRedirectPermanentPreserveMethod(url); 200Assert.IsType<LocalRedirectResult>(result);
LocalRedirectResultTest.cs (7)
24var result = new LocalRedirectResult(url); 39var result = new LocalRedirectResult(url, permanent: true); 54var result = new LocalRedirectResult(url, permanent: true, preserveMethod: true); 72var result = new LocalRedirectResult(contentPath); 96var result = new LocalRedirectResult(contentPath); 118var result = new LocalRedirectResult(contentPath); 139serviceCollection.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> 411public 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> 424public 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> 438public 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> 452public 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> 718public 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> 731public 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> 745public 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> 759public virtual LocalRedirectResult LocalRedirectPermanentPreserveMethod([StringSyntax(StringSyntaxAttribute.Uri, UriKind.Relative)] string localUrl)
Microsoft.AspNetCore.Mvc.RazorPages.Test (16)
PageModelTest.cs (8)
137var result = pageModel.LocalRedirect(url); 140Assert.IsType<LocalRedirectResult>(result); 154var result = pageModel.LocalRedirectPermanent(url); 157Assert.IsType<LocalRedirectResult>(result); 171var result = pageModel.LocalRedirectPreserveMethod(url); 174Assert.IsType<LocalRedirectResult>(result); 188var result = pageModel.LocalRedirectPermanentPreserveMethod(url); 191Assert.IsType<LocalRedirectResult>(result);
PageTest.cs (8)
157var result = page.LocalRedirect(url); 160Assert.IsType<LocalRedirectResult>(result); 174var result = page.LocalRedirectPermanent(url); 177Assert.IsType<LocalRedirectResult>(result); 191var result = page.LocalRedirectPreserveMethod(url); 194Assert.IsType<LocalRedirectResult>(result); 208var result = page.LocalRedirectPermanentPreserveMethod(url); 211Assert.IsType<LocalRedirectResult>(result);