• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MorganKryze / ConsoleAppVisuals / 8158191062

05 Mar 2024 02:47PM UTC coverage: 86.165% (+0.9%) from 85.231%
8158191062

push

github

MorganKryze
📖 (readme) update roadmap

931 of 1144 branches covered (81.38%)

Branch coverage included in aggregate %.

1803 of 2029 relevant lines covered (88.86%)

412.64 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/ConsoleAppVisuals/attributes/VisualAttribute.cs
1
/*
2
    GNU GPL License 2024 MorganKryze(Yann Vidamment)
3
    For full license information, please visit: https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/LICENSE
4
*/
5
namespace ConsoleAppVisuals.Attributes;
6

7
/// <summary>
8
/// The <see cref="VisualAttribute"/> class is used to mark a class, struct, enum, constructor, method, property, field, event, interface, or delegate as a visual and so interact with the console.
9
/// </summary>
10
/// <remarks> [ WARNING ] This element cannot be tested. </remarks>
11
[AttributeUsage(
12
    AttributeTargets.All,
13
    Inherited = false
14
)]
15
public sealed class VisualAttribute : Attribute
16
{
17
    /// <summary>
18
    /// Initializes a new instance of the <see cref="VisualAttribute"/> class.
19
    /// </summary>
20
    public VisualAttribute() { }
12✔
21

22
    /// <summary>
23
    /// Initializes a new instance of the <see cref="VisualAttribute"/> class with a specified workaround message.
24
    /// </summary>
25
    /// <param name="message">The text string that describes alternative workarounds.</param>
26
    public VisualAttribute(string? message)
2✔
27
    {
28
        Message = message;
2✔
29
    }
2✔
30

31
    /// <summary>
32
    /// Initializes a new instance of the <see cref="VisualAttribute"/> class with a workaround message and a Boolean value indicating whether the obsolete element usage is considered an error.
33
    /// </summary>
34
    /// <param name="message">The text string that describes alternative workarounds.</param>
35
    /// <param name="error">True if the obsolete element usage generates a compiler error; false if it generates a compiler warning.</param>
36
    public VisualAttribute(string? message, bool error)
2✔
37
    {
38
        Message = message;
2✔
39
        IsError = error;
2✔
40
    }
2✔
41

42
    /// <summary>
43
    /// Gets or sets the ID that the compiler will use when reporting a use of the API.
44
    /// </summary>
45
    public string? DiagnosticId { get; set; }
4✔
46

47
    /// <summary>
48
    /// Gets a value that indicates whether the compiler will treat usage of the obsolete program element as an error.
49
    /// </summary>
50
    /// <returns>True if the obsolete element usage is considered an error; otherwise, false. The default is false.</returns>
51
    public bool IsError { get; }
6✔
52

53
    /// <summary>
54
    /// Gets the workaround message.
55
    /// </summary>
56
    /// <returns>The workaround text string.</returns>
57
    public string? Message { get; }
6✔
58

59
    /// <summary>
60
    /// Gets or sets the URL for corresponding documentation. The API accepts a format string instead of an actual URL, creating a generic URL that includes the diagnostic ID.
61
    /// </summary>
62
    /// <returns>The format string that represents a URL to corresponding documentation.</returns>
63
    public string? UrlFormat { get; set; }
4✔
64
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc