src/BeatPulse/WebHostBuilderExtensions.cs
/// <summary>
/// Add a StartupFilter that provides BeatPulse features.
/// </summary>
/// <param name="hostBuilder">The <see cref="IWebHostBuilder"/>.</param>
/// <param name="setup">Provided delegate to configure BeatPulse options like timeout, path, detailed errors etc.</param>
/// <returns>The <see cref="IWebHostBuilder"/> reference with BeatPulse features.</returns>
Add a StartupFilter that provides BeatPulse features.
Add a StartupFilter that provides BeatPulse features .
public static IWebHostBuilder UseBeatPulse(this IWebHostBuilder hostBuilder, Action<BeatPulseOptions> setup = null)
        {
            hostBuilder.ConfigureServices(defaultServices =>
            {
                var options = new BeatPulseOptionsConfiguration();
                var configuration = defaultServices.BuildServiceProvider().GetRequiredService<IConfiguration>();
                configuration.Bind(BeatPulseKeys.BEATPULSE_OPTIONS_SETTING_KEY, options);
                setup?.Invoke(options);
                defaultServices.AddSingleton<IStartupFilter>(new BeatPulseFilter(options));
            });
            return hostBuilder;
        }
public static IWebHostBuilder UseBeatPulse ( this IWebHostBuilder hostBuilder , Action < BeatPulseOptions > setup = null ) { hostBuilder . ConfigureServices ( defaultServices => { var options = new BeatPulseOptionsConfiguration ( ) ; var configuration = defaultServices . BuildServiceProvider ( ) . GetRequiredService < IConfiguration > ( ) ; configuration . Bind ( BeatPulseKeys . BEATPULSE_OPTIONS_SETTING_KEY , options ) ; setup ? . Invoke ( options ) ; defaultServices . AddSingleton < IStartupFilter > ( new BeatPulseFilter ( options ) ) ; } ) ; return hostBuilder ; }
Add a StartupFilter that provides BeatPulse features.
Add a StartupFilter that provides BeatPulse features .
The  reference with BeatPulse features.
The reference with BeatPulse features .
IWebHostBuilder
this
setup
Action<BeatPulseOptions>
Provided delegate to configure BeatPulse options like timeout, path, detailed errors etc.
Provided delegate to configure BeatPulse options like timeout path detailed errors etc .
hostBuilder
None