21 writes to Result
CorsWebSite (1)
Filters\AllRequestsBlockingAuthorizationFilter.cs (1)
14context.Result = new ContentResult()
Microsoft.AspNetCore.Mvc.Core (4)
Authorization\AuthorizeFilter.cs (2)
189context.Result = new ChallengeResult(effectivePolicy.AuthenticationSchemes.ToArray()); 193context.Result = new ForbidResult(effectivePolicy.AuthenticationSchemes.ToArray());
RequireHttpsAttribute.cs (2)
68filterContext.Result = new StatusCodeResult(StatusCodes.Status403Forbidden); 98filterContext.Result = new RedirectResult(newUrl, permanentValue);
Microsoft.AspNetCore.Mvc.Core.Test (1)
RequireHttpsAttributeTests.cs (1)
223filterContext.Result = new StatusCodeResult(StatusCodes.Status404NotFound);
Microsoft.AspNetCore.Mvc.Core.TestCommon (7)
CommonResourceInvokerTest.cs (7)
630.Callback<AuthorizationFilterContext>(c => c.Result = challenge.Object) 669context.Result = challenge.Object; 745.Callback<AuthorizationFilterContext>(c => c.Result = challenge.Object) 1717c.Result = Result; 1748c.Result = Result; 1779c.Result = Result; 1811c.Result = Result;
Microsoft.AspNetCore.Mvc.Cors (2)
CorsAuthorizationFilter.cs (1)
95context.Result = new StatusCodeResult(StatusCodes.Status204NoContent);
DisableCorsAuthorizationFilter.cs (1)
35context.Result = new StatusCodeResult(StatusCodes.Status204NoContent);
Microsoft.AspNetCore.Mvc.RazorPages.Test (2)
Infrastructure\PageActionInvokerTest.cs (2)
562context.Result = expectedResult; 597context.Result = expectedResult;
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Filters\AntiforgeryMiddlewareAuthorizationFilter.cs (1)
25context.Result = new AntiforgeryValidationFailedResult();
Filters\ValidateAntiforgeryTokenAuthorizationFilter.cs (1)
42context.Result = new AntiforgeryValidationFailedResult();
RazorPagesWebSite (2)
Pages\ShortCircuitPageAtAuthFilter.cshtml.cs (2)
31context.Result = new PageResult(); 43context.Result = new PageResult();
52 references to Result
Microsoft.AspNetCore.Mvc.Abstractions (1)
Filters\AuthorizationFilterContext.cs (1)
25/// Gets or sets the result of the request. Setting <see cref="Result"/> to a non-<c>null</c> value inside
Microsoft.AspNetCore.Mvc.Core (9)
Infrastructure\ResourceInvoker.cs (4)
371if (authorizationContext.Result != null) 401if (authorizationContext.Result != null) 413Debug.Assert(_authorizationContext.Result != null); 418_result = _authorizationContext.Result;
RequireHttpsAttribute.cs (5)
36/// <see cref="AuthorizationFilterContext.Result"/> to a result which will redirect the client to the HTTPS 37/// version of the request URI. Otherwise, sets <see cref="AuthorizationFilterContext.Result"/> to a result 53/// <see cref="AuthorizationFilterContext.Result"/> will not be <c>null</c> after this method returns. 57/// If it was a GET request, default implementation sets <see cref="AuthorizationFilterContext.Result"/> to a 59/// implementation sets <see cref="AuthorizationFilterContext.Result"/> to a result which will set the status
Microsoft.AspNetCore.Mvc.Core.Test (29)
Authorization\AuthorizeFilterTest.cs (20)
49Assert.IsType<ChallengeResult>(authorizationContext.Result); 96Assert.Null(authorizationContext.Result); 114Assert.Null(authorizationContext.Result); 118Assert.Null(authorizationContext.Result); 122Assert.Null(authorizationContext.Result); 139Assert.Null(authorizationContext.Result); 153Assert.Null(authorizationContext.Result); 168Assert.IsType<ChallengeResult>(authorizationContext.Result); 184Assert.Null(authorizationContext.Result); 198Assert.Null(authorizationContext.Result); 228Assert.Null(authorizationContext.Result); 272Assert.IsType<ForbidResult>(authorizationContext.Result); 298Assert.IsType<ForbidResult>(authorizationContext.Result); 306Assert.IsType<ForbidResult>(authorizationContext.Result); 326Assert.IsType<ForbidResult>(authorizationContext.Result); 344Assert.Null(authorizationContext.Result); 364Assert.IsType<ForbidResult>(authorizationContext.Result); 384Assert.Null(authorizationContext.Result); 399Assert.IsType<ForbidResult>(authorizationContext.Result); 416Assert.IsType<ForbidResult>(authorizationContext.Result);
RequireHttpsAttributeTests.cs (9)
29Assert.Null(authContext.Result); 97Assert.NotNull(authContext.Result); 98var result = Assert.IsType<RedirectResult>(authContext.Result); 123Assert.NotNull(authContext.Result); 124var result = Assert.IsType<StatusCodeResult>(authContext.Result); 143var result = Assert.IsType<StatusCodeResult>(authContext.Result); 186Assert.NotNull(authContext.Result); 187var result = Assert.IsType<RedirectResult>(authContext.Result); 215var result = Assert.IsType<RedirectResult>(authContext.Result);
Microsoft.AspNetCore.Mvc.Cors.Test (6)
CorsAuthorizationFilterTest.cs (3)
37await authorizationContext.Result.ExecuteResultAsync(authorizationContext); 66await authorizationContext.Result.ExecuteResultAsync(authorizationContext); 87await authorizationContext.Result.ExecuteResultAsync(authorizationContext);
DisableCorsAuthorizationFilterTest.cs (3)
31Assert.Null(authorizationFilterContext.Result); 50Assert.Null(authorizationFilterContext.Result); 72var statusCodeResult = Assert.IsType<StatusCodeResult>(authorizationFilterContext.Result);
Microsoft.AspNetCore.Mvc.RazorPages.Test (2)
Infrastructure\PageActionInvokerTest.cs (2)
563result = context.Result; 598result = context.Result;
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (5)
Filters\AntiforgeryMiddlewareAuthorizationFilterTest.cs (4)
29Assert.IsType<AntiforgeryValidationFailedResult>(context.Result); 47Assert.Null(context.Result); 64Assert.Null(context.Result); 81Assert.Null(context.Result);
Filters\ValidateAntiforgeryTokenAuthorizationFilterTest.cs (1)
96Assert.IsType<AntiforgeryValidationFailedResult>(context.Result);