21 writes to Result
CorsWebSite (1)
Filters\AllRequestsBlockingAuthorizationFilter.cs (1)
14
context.
Result
= new ContentResult()
Microsoft.AspNetCore.Mvc.Core (4)
Authorization\AuthorizeFilter.cs (2)
189
context.
Result
= new ChallengeResult(effectivePolicy.AuthenticationSchemes.ToArray());
193
context.
Result
= new ForbidResult(effectivePolicy.AuthenticationSchemes.ToArray());
RequireHttpsAttribute.cs (2)
68
filterContext.
Result
= new StatusCodeResult(StatusCodes.Status403Forbidden);
98
filterContext.
Result
= new RedirectResult(newUrl, permanentValue);
Microsoft.AspNetCore.Mvc.Core.Test (1)
RequireHttpsAttributeTests.cs (1)
223
filterContext.
Result
= new StatusCodeResult(StatusCodes.Status404NotFound);
Microsoft.AspNetCore.Mvc.Core.TestCommon (7)
CommonResourceInvokerTest.cs (7)
630
.Callback<AuthorizationFilterContext>(c => c.
Result
= challenge.Object)
669
context.
Result
= challenge.Object;
745
.Callback<AuthorizationFilterContext>(c => c.
Result
= challenge.Object)
1717
c.
Result
= Result;
1748
c.
Result
= Result;
1779
c.
Result
= Result;
1811
c.
Result
= Result;
Microsoft.AspNetCore.Mvc.Cors (2)
CorsAuthorizationFilter.cs (1)
95
context.
Result
= new StatusCodeResult(StatusCodes.Status204NoContent);
DisableCorsAuthorizationFilter.cs (1)
35
context.
Result
= new StatusCodeResult(StatusCodes.Status204NoContent);
Microsoft.AspNetCore.Mvc.RazorPages.Test (2)
Infrastructure\PageActionInvokerTest.cs (2)
562
context.
Result
= expectedResult;
597
context.
Result
= expectedResult;
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Filters\AntiforgeryMiddlewareAuthorizationFilter.cs (1)
25
context.
Result
= new AntiforgeryValidationFailedResult();
Filters\ValidateAntiforgeryTokenAuthorizationFilter.cs (1)
42
context.
Result
= new AntiforgeryValidationFailedResult();
RazorPagesWebSite (2)
Pages\ShortCircuitPageAtAuthFilter.cshtml.cs (2)
31
context.
Result
= new PageResult();
43
context.
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)
371
if (authorizationContext.
Result
!= null)
401
if (authorizationContext.
Result
!= null)
413
Debug.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)
49
Assert.IsType<ChallengeResult>(authorizationContext.
Result
);
96
Assert.Null(authorizationContext.
Result
);
114
Assert.Null(authorizationContext.
Result
);
118
Assert.Null(authorizationContext.
Result
);
122
Assert.Null(authorizationContext.
Result
);
139
Assert.Null(authorizationContext.
Result
);
153
Assert.Null(authorizationContext.
Result
);
168
Assert.IsType<ChallengeResult>(authorizationContext.
Result
);
184
Assert.Null(authorizationContext.
Result
);
198
Assert.Null(authorizationContext.
Result
);
228
Assert.Null(authorizationContext.
Result
);
272
Assert.IsType<ForbidResult>(authorizationContext.
Result
);
298
Assert.IsType<ForbidResult>(authorizationContext.
Result
);
306
Assert.IsType<ForbidResult>(authorizationContext.
Result
);
326
Assert.IsType<ForbidResult>(authorizationContext.
Result
);
344
Assert.Null(authorizationContext.
Result
);
364
Assert.IsType<ForbidResult>(authorizationContext.
Result
);
384
Assert.Null(authorizationContext.
Result
);
399
Assert.IsType<ForbidResult>(authorizationContext.
Result
);
416
Assert.IsType<ForbidResult>(authorizationContext.
Result
);
RequireHttpsAttributeTests.cs (9)
29
Assert.Null(authContext.
Result
);
97
Assert.NotNull(authContext.
Result
);
98
var result = Assert.IsType<RedirectResult>(authContext.
Result
);
123
Assert.NotNull(authContext.
Result
);
124
var result = Assert.IsType<StatusCodeResult>(authContext.
Result
);
143
var result = Assert.IsType<StatusCodeResult>(authContext.
Result
);
186
Assert.NotNull(authContext.
Result
);
187
var result = Assert.IsType<RedirectResult>(authContext.
Result
);
215
var result = Assert.IsType<RedirectResult>(authContext.
Result
);
Microsoft.AspNetCore.Mvc.Cors.Test (6)
CorsAuthorizationFilterTest.cs (3)
37
await authorizationContext.
Result
.ExecuteResultAsync(authorizationContext);
66
await authorizationContext.
Result
.ExecuteResultAsync(authorizationContext);
87
await authorizationContext.
Result
.ExecuteResultAsync(authorizationContext);
DisableCorsAuthorizationFilterTest.cs (3)
31
Assert.Null(authorizationFilterContext.
Result
);
50
Assert.Null(authorizationFilterContext.
Result
);
72
var statusCodeResult = Assert.IsType<StatusCodeResult>(authorizationFilterContext.
Result
);
Microsoft.AspNetCore.Mvc.RazorPages.Test (2)
Infrastructure\PageActionInvokerTest.cs (2)
563
result = context.
Result
;
598
result = context.
Result
;
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (5)
Filters\AntiforgeryMiddlewareAuthorizationFilterTest.cs (4)
29
Assert.IsType<AntiforgeryValidationFailedResult>(context.
Result
);
47
Assert.Null(context.
Result
);
64
Assert.Null(context.
Result
);
81
Assert.Null(context.
Result
);
Filters\ValidateAntiforgeryTokenAuthorizationFilterTest.cs (1)
96
Assert.IsType<AntiforgeryValidationFailedResult>(context.
Result
);