src/BeatPulse/Core/LivenessResult.cs
/// <summary>
/// Finish liveness result with specified information.
/// </summary>
/// <param name="name">The configured liveness name.</param>
/// <param name="path">The configured liveness path.</param>
/// <param name="duration">The liveness execution duration.</param>
/// <param name="detailedErrors">True if detailed errors configuration value.</param>
/// <returns><see cref="LivenessResult"/>.</returns>
Finish liveness result with specified information.
Finish liveness result with specified information .
public LivenessResult SetEnforced(string name, string path, TimeSpan duration, bool detailedErrors = false)
        {
            Name = name;
            Path = path;
            Run = true;
            Elapsed = duration;
            if (Exception != null)
            {
                Message = BeatPulseKeys.BEATPULSE_HEALTHCHECK_DEFAULT_ERROR_MESSAGE;
                if (!detailedErrors)
                {
                    Exception = null;
                }
            }
            return this;
        }
public LivenessResult SetEnforced ( string name , string path , TimeSpan duration , bool detailedErrors = false ) { Name = name ; Path = path ; Run = true ; Elapsed = duration ; if ( Exception != null ) { Message = BeatPulseKeys . BEATPULSE_HEALTHCHECK_DEFAULT_ERROR_MESSAGE ; if ( ! detailedErrors ) { Exception = null ; } } return this ; }
Finish liveness result with specified information.
Finish liveness result with specified information .
None
name
string
The configured liveness name.
The configured liveness name .
path
string
The configured liveness path.
The configured liveness path .
duration
TimeSpan
The liveness execution duration.
The liveness execution duration .
detailedErrors
bool
True if detailed errors configuration value.
True if detailed errors configuration value .