File tree 1 file changed +6
-2
lines changed
src/Http/Http.Abstractions/src/Routing
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,11 @@ public static class EndpointHttpContextExtensions
14
14
/// Extension method for getting the <see cref="Endpoint"/> for the current request.
15
15
/// </summary>
16
16
/// <param name="context">The <see cref="HttpContext"/> context.</param>
17
- /// <returns>The <see cref="Endpoint"/>.</returns>
17
+ /// <returns>The <see cref="Endpoint"/> or <c>null</c> if the request doesn't have an endpoint.</returns>
18
+ /// <remarks>
19
+ /// The endpoint for a request is typically set by routing middleware. A request might not have
20
+ /// an endpoint if routing middleware hasn't run yet, or the request didn't match a route.
21
+ /// </remarks>
18
22
public static Endpoint ? GetEndpoint ( this HttpContext context )
19
23
{
20
24
ArgumentNullException . ThrowIfNull ( context ) ;
@@ -26,7 +30,7 @@ public static class EndpointHttpContextExtensions
26
30
/// Extension method for setting the <see cref="Endpoint"/> for the current request.
27
31
/// </summary>
28
32
/// <param name="context">The <see cref="HttpContext"/> context.</param>
29
- /// <param name="endpoint">The <see cref="Endpoint"/>.</param>
33
+ /// <param name="endpoint">The <see cref="Endpoint"/>. A <c>null</c> value clears the endpoint for the current request. </param>
30
34
public static void SetEndpoint ( this HttpContext context , Endpoint ? endpoint )
31
35
{
32
36
ArgumentNullException . ThrowIfNull ( context ) ;
You can’t perform that action at this time.
0 commit comments