src/BeatPulse/Core/BulsePulseContextExtensions.cs
/// <summary>
/// Add a new liveness into the <see cref="BeatPulseContext"/>
/// </summary>
/// <param name="beatPulseContext">The <see cref="BeatPulseContext"/>.</param>
/// <param name="name">The name of liveness to be added.</param>
/// <param name="setup">Provided delegate to configure the liveness to be added.</param>
/// <returns><see cref="BeatPulseContext"/></returns>
Add a new liveness into the
Add a new liveness into the
public static BeatPulseContext AddLiveness(this BeatPulseContext beatPulseContext, string name, Action<BeatPulseLivenessRegistrationOptions> setup)
        {
            var options = new BeatPulseLivenessRegistrationOptions(name);
            setup(options);
            beatPulseContext.AddLiveness(options.CreateRegistration());
            return beatPulseContext;
        }
public static BeatPulseContext AddLiveness ( this BeatPulseContext beatPulseContext , string name , Action < BeatPulseLivenessRegistrationOptions > setup ) { var options = new BeatPulseLivenessRegistrationOptions ( name ) ; setup ( options ) ; beatPulseContext . AddLiveness ( options . CreateRegistration ( ) ) ; return beatPulseContext ; }
Add a new liveness into the
Add a new liveness into the
None
BeatPulseContext
this
name
string
The name of liveness to be added.
The name of liveness to be added .
setup
Action<BeatPulseLivenessRegistrationOptions>
Provided delegate to configure the liveness to be added.
Provided delegate to configure the liveness to be added .
beatPulseContext
None