Search Results for

    Show / Hide Table of Contents
    View Source

    Class NotificationMethodBase

    Provides a base class for health check notification methods.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.HealthChecks.NotificationMethods
    Assembly: Umbraco.Core.dll
    Syntax
    public abstract class NotificationMethodBase : IHealthCheckNotificationMethod, IDiscoverable

    Constructors

    View Source

    NotificationMethodBase(IOptionsMonitor<HealthChecksSettings>)

    Initializes a new instance of the NotificationMethodBase class.

    Declaration
    protected NotificationMethodBase(IOptionsMonitor<HealthChecksSettings> healthCheckSettings)
    Parameters
    Type Name Description
    IOptionsMonitor<HealthChecksSettings> healthCheckSettings

    The health check settings monitor.

    Properties

    View Source

    Enabled

    Gets a value indicating whether this notification method is enabled.

    Declaration
    public bool Enabled { get; protected set; }
    Property Value
    Type Description
    bool
    View Source

    FailureOnly

    Gets or sets a value indicating whether notifications should only be sent on failure.

    Declaration
    public bool FailureOnly { get; protected set; }
    Property Value
    Type Description
    bool
    View Source

    Settings

    Gets the settings dictionary for this notification method.

    Declaration
    public IDictionary<string, string>? Settings { get; }
    Property Value
    Type Description
    IDictionary<string, string>
    View Source

    Verbosity

    Gets or sets the verbosity level for the notification.

    Declaration
    public HealthCheckNotificationVerbosity Verbosity { get; protected set; }
    Property Value
    Type Description
    HealthCheckNotificationVerbosity

    Methods

    View Source

    SendAsync(HealthCheckResults)

    Sends the health check results via this notification method.

    Declaration
    public abstract Task SendAsync(HealthCheckResults results)
    Parameters
    Type Name Description
    HealthCheckResults results

    The health check results to send.

    Returns
    Type Description
    Task

    A task representing the asynchronous operation.

    View Source

    ShouldSend(HealthCheckResults)

    Determines whether a notification should be sent based on the results and configuration.

    Declaration
    protected bool ShouldSend(HealthCheckResults results)
    Parameters
    Type Name Description
    HealthCheckResults results

    The health check results.

    Returns
    Type Description
    bool

    true if a notification should be sent; otherwise, false.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX