< Summary

Information
Class: Pozitron.QuerySpecification.DiscoveryAttribute
Assembly: Pozitron.QuerySpecification
File(s): /home/runner/work/QuerySpecification/QuerySpecification/src/QuerySpecification/DiscoveryAttribute.cs
Tag: 74_17335419374
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 53
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

File(s)

/home/runner/work/QuerySpecification/QuerySpecification/src/QuerySpecification/DiscoveryAttribute.cs

#LineLine coverage
 1namespace Pozitron.QuerySpecification;
 2
 3/// <summary>
 4/// Specifies whether auto discovery for evaluators and validators is enabled.
 5/// </summary>
 6[AttributeUsage(AttributeTargets.Assembly)]
 7public sealed class SpecAutoDiscoveryAttribute : Attribute
 8{
 9    /// <summary>
 10    /// Gets the value indicating whether auto discovery is enabled.
 11    /// </summary>
 12    public string Value { get; }
 13
 14    /// <summary>
 15    /// Defines a SpecAutoDiscoveryAttribute to enable or disable auto discovery.
 16    /// </summary>
 17    /// <param name="value">The value indicating whether auto discovery is enabled.</param>
 18    public SpecAutoDiscoveryAttribute(string value)
 19    {
 20        Value = value;
 21    }
 22}
 23
 24/// <summary>
 25/// Specifies discovery options for evaluators and validators, such as the order and whether discovery is enabled.
 26/// </summary>
 27[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
 28public class DiscoveryAttribute : Attribute
 29{
 30    /// <summary>
 31    /// Gets the order in which the evaluator/validator should be applied. Lower values are applied first.
 32    /// </summary>
 18433    public int Order { get; set; } = int.MaxValue;
 34
 35    /// <summary>
 36    /// Gets a value indicating whether the evaluator/validator is discoverable.
 37    /// </summary>
 16838    public bool Enable { get; set; } = true;
 39}
 40
 41/// <summary>
 42/// Specifies discovery options for evaluators, such as the order and whether discovery is enabled.
 43/// </summary>
 44public sealed class EvaluatorDiscoveryAttribute : DiscoveryAttribute
 45{
 46}
 47
 48/// <summary>
 49/// Specifies discovery options for validators, such as the order and whether discovery is enabled.
 50/// </summary>
 51public sealed class ValidatorDiscoveryAttribute : DiscoveryAttribute
 52{
 53}

Methods/Properties

Order()
Enable()