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

MorganKryze / ConsoleAppVisuals / 7473998763

10 Jan 2024 11:06AM UTC coverage: 37.669% (+1.7%) from 35.959%
7473998763

push

github

MorganKryze
🤖 (ci and docs) remove obsolete attribute from coverage

365 of 1034 branches covered (0.0%)

Branch coverage included in aggregate %.

750 of 1926 relevant lines covered (38.94%)

157.53 hits per line

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

0.0
/src/ConsoleAppVisuals/attributes/VisualAttribute.cs
1
/*
2
    MIT License 2023 MorganKryze
3
    For full license information, please visit: https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/LICENSE
4
*/
5
namespace ConsoleAppVisuals;
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() { }
×
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)
×
27
    {
28
        Message = message;
×
29
    }
×
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)
×
37
    {
38
        Message = message;
×
39
        IsError = error;
×
40
    }
×
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; }
×
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; }
×
52

53
    /// <summary>
54
    /// Gets the workaround message.
55
    /// </summary>
56
    /// <returns>The workaround text string.</returns>
57
    public string? Message { get; }
×
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; }
×
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

© 2025 Coveralls, Inc