2
2
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3
3
4
4
using System ;
5
- using System . Collections . Generic ;
6
- using System . Text ;
7
5
using Microsoft . AspNetCore . Builder ;
8
- using Microsoft . AspNetCore . Http ;
9
- using Microsoft . AspNetCore . Routing ;
6
+ using Microsoft . AspNetCore . Diagnostics . HealthChecks ;
10
7
using Microsoft . Extensions . Options ;
8
+ using Microsoft . AspNetCore . Routing ;
11
9
12
- namespace Microsoft . AspNetCore . Diagnostics . HealthChecks . Builder
10
+ namespace Microsoft . AspNetCore . Builder
13
11
{
12
+ /// <summary>
13
+ /// Provides extension methods for <see cref="IEndpointRouteBuilder"/> to add health checks.
14
+ /// </summary>
14
15
public static class HealthCheckEndpointRouteBuilderExtensions
15
16
{
17
+ /// <summary>
18
+ /// Adds a health checks endpoint to the <see cref="IEndpointRouteBuilder"/> with the specified template.
19
+ /// </summary>
20
+ /// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the health checks endpoint to.</param>
21
+ /// <param name="pattern">The URL pattern of the health checks endpoint.</param>
22
+ /// <returns>A convention builder for the health checks endpoint.</returns>
16
23
public static IEndpointConventionBuilder MapHealthChecks (
17
24
this IEndpointRouteBuilder builder ,
18
25
string pattern )
@@ -25,6 +32,13 @@ public static IEndpointConventionBuilder MapHealthChecks(
25
32
return MapHealthChecksCore ( builder , pattern , null ) ;
26
33
}
27
34
35
+ /// <summary>
36
+ /// Adds a health checks endpoint to the <see cref="IEndpointRouteBuilder"/> with the specified template and options.
37
+ /// </summary>
38
+ /// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the health checks endpoint to.</param>
39
+ /// <param name="pattern">The URL pattern of the health checks endpoint.</param>
40
+ /// <param name="options">A <see cref="HealthCheckOptions"/> used to configure the health checks.</param>
41
+ /// <returns>A convention builder for the health checks endpoint.</returns>
28
42
public static IEndpointConventionBuilder MapHealthChecks (
29
43
this IEndpointRouteBuilder builder ,
30
44
string pattern ,
0 commit comments