src/Slugent.APIInfo/PingInfo/EndpointRouteBuilderExtensionsPing.cs
/// <summary>
/// Adds a configuration endpoint to the <see cref="IEndpointRouteBuilder"/> for the ping info.
/// </summary>
/// <param name="endpoints">The <see cref="IEndpointRouteBuilder"/> to add endpoint to.</param>
/// <param name="optionsDelegate">The EndpointPingConfig object</param>
/// <returns>A route for the endpoint.</returns>
Adds a configuration endpoint to the  for the ping info.
Adds a configuration endpoint to the for the ping info .
public static IEndpointConventionBuilder? MapSlugEntPing(
            this IEndpointRouteBuilder endpoints,
            Action<EndpointPingConfig>? optionsDelegate = default)
        {
            if (endpoints == null) throw new ArgumentNullException(nameof(endpoints));
            IAPIInfoBase apiInfoBase = endpoints.ServiceProvider.GetRequiredService<IAPIInfoBase>();
            string urlPattern = apiInfoBase.InfoRootPath + "/ping";
            var options = new EndpointPingConfig();
            optionsDelegate?.Invoke(options);
            return MapPingCore(endpoints, urlPattern, options);
        }
public static IEndpointConventionBuilder ? MapSlugEntPing ( this IEndpointRouteBuilder endpoints , Action < EndpointPingConfig > ? optionsDelegate = default ) { if ( endpoints == null ) throw new ArgumentNullException ( nameof ( endpoints ) ) ; IAPIInfoBase apiInfoBase = endpoints . ServiceProvider . GetRequiredService < IAPIInfoBase > ( ) ; string urlPattern = apiInfoBase . InfoRootPath + " " ; var options = new EndpointPingConfig ( ) ; optionsDelegate ? . Invoke ( options ) ; return MapPingCore ( endpoints , urlPattern , options ) ; }
Adds a configuration endpoint to the  for the ping info.
Adds a configuration endpoint to the for the ping info .
A route for the endpoint.
A route for the endpoint .
IEndpointRouteBuilder
this
optionsDelegate
Action<EndpointPingConfig>?
The EndpointPingConfig object
The EndpointPingConfig object
endpoints
The  to add endpoint to.
The to add endpoint to .