2 instantiations of RedirectHttpResult
Microsoft.AspNetCore.Http.Results (2)
TypedResults.cs (2)
571return new(url, permanent, preserveMethod); 591return new(localUrl, acceptLocalUrlOnly: true, permanent, preserveMethod);
43 references to RedirectHttpResult
Microsoft.AspNetCore.Http.Results (8)
RedirectHttpResult.cs (4)
18/// Initializes a new instance of the <see cref="RedirectHttpResult"/> class with the values 28/// Initializes a new instance of the <see cref="RedirectHttpResult"/> class with the values 39/// Initializes a new instance of the <see cref="RedirectHttpResult"/> class with the values 51/// Initializes a new instance of the <see cref="RedirectHttpResult"/> class with the values
TypedResults.cs (4)
566/// <returns>The created <see cref="RedirectHttpResult"/> for the response.</returns> 567public static RedirectHttpResult Redirect([StringSyntax(StringSyntaxAttribute.Uri)] string url, bool permanent = false, bool preserveMethod = false) 586/// <returns>The created <see cref="RedirectHttpResult"/> for the response.</returns> 587public static RedirectHttpResult LocalRedirect([StringSyntax(StringSyntaxAttribute.Uri, UriKind.Relative)] string localUrl, bool permanent = false, bool preserveMethod = false)
Microsoft.AspNetCore.Http.Results.Tests (35)
LocalRedirectResultTests.cs (6)
19var result = new RedirectHttpResult(url, acceptLocalUrlOnly: true, false, false); 34var result = new RedirectHttpResult(url, acceptLocalUrlOnly: true, permanent: true, preserveMethod: false); 49var result = new RedirectHttpResult(url, acceptLocalUrlOnly: true, permanent: true, preserveMethod: true); 66var result = new RedirectHttpResult(contentPath, acceptLocalUrlOnly: true, false, false); 89var result = new RedirectHttpResult(contentPath, acceptLocalUrlOnly: true, false, false); 110var result = new RedirectHttpResult(contentPath, acceptLocalUrlOnly: true, false, false);
RedirectResultTests.cs (6)
17var result = new RedirectHttpResult(url, permanent: true, preserveMethod: true); 29var result = new RedirectHttpResult("url"); 45var actual = RedirectHttpResult.IsLocalUrl(url); 66var actual = RedirectHttpResult.IsLocalUrl(url); 80var actual = RedirectHttpResult.IsLocalUrl(url); 88var redirectResult = new RedirectHttpResult(contentPath, false, false);
ResultsTests.cs (16)
1093var result = Results.LocalRedirect(localUrl) as RedirectHttpResult; 1110var result = Results.LocalRedirect(localUrl, permanent) as RedirectHttpResult; 1128var result = Results.LocalRedirect(localUrl, permanent, preserveMethod) as RedirectHttpResult; 1146var result = Results.LocalRedirect(localUrl, permanent, preserveMethod) as RedirectHttpResult; 1476var result = Results.Redirect(url) as RedirectHttpResult; 1492var result = Results.Redirect(url, true) as RedirectHttpResult; 1508var result = Results.Redirect(url, false, true) as RedirectHttpResult; 1770(() => Results.Redirect("/path", false, false), typeof(RedirectHttpResult)), 1771(() => Results.LocalRedirect("/path", false, false), typeof(RedirectHttpResult)),
TypedResultsTests.cs (7)
937var result = TypedResults.LocalRedirect(localUrl); 954var result = TypedResults.LocalRedirect(localUrl, permanent); 972var result = TypedResults.LocalRedirect(localUrl, permanent, preserveMethod); 990var result = TypedResults.LocalRedirect(localUrl, permanent, preserveMethod); 1258var result = TypedResults.Redirect(url); 1274var result = TypedResults.Redirect(url, true); 1290var result = TypedResults.Redirect(url, false, true);