2017-12-30 06:30:16 +00:00
|
|
|
using System;
|
2017-05-14 17:19:19 +00:00
|
|
|
|
|
|
|
namespace NzbDrone.Core.HealthCheck
|
|
|
|
{
|
|
|
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
|
2019-10-19 15:15:28 +00:00
|
|
|
public class CheckOnAttribute : Attribute
|
2017-05-14 17:19:19 +00:00
|
|
|
{
|
|
|
|
public Type EventType { get; set; }
|
2017-12-30 06:30:16 +00:00
|
|
|
public CheckOnCondition Condition { get; set; }
|
2017-05-14 17:19:19 +00:00
|
|
|
|
2017-12-30 06:30:16 +00:00
|
|
|
public CheckOnAttribute(Type eventType, CheckOnCondition condition = CheckOnCondition.Always)
|
2017-05-14 17:19:19 +00:00
|
|
|
{
|
|
|
|
EventType = eventType;
|
2017-12-30 06:30:16 +00:00
|
|
|
Condition = condition;
|
2017-05-14 17:19:19 +00:00
|
|
|
}
|
|
|
|
}
|
2017-12-30 06:30:16 +00:00
|
|
|
|
|
|
|
public enum CheckOnCondition
|
|
|
|
{
|
|
|
|
Always,
|
|
|
|
FailedOnly,
|
|
|
|
SuccessfulOnly
|
|
|
|
}
|
2017-05-14 17:19:19 +00:00
|
|
|
}
|