-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFileIssue.cs
More file actions
40 lines (35 loc) · 1.19 KB
/
Copy pathFileIssue.cs
File metadata and controls
40 lines (35 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
namespace SmartFileKit.Domain
{
/// <summary>
/// Represents a specific security finding or warning detected during file analysis.
/// </summary>
public class FileIssue
{
/// <summary>
/// Gets the type of issue.
/// </summary>
public IssueType Type { get; }
/// <summary>
/// Gets a descriptive message explaining the finding.
/// </summary>
public string Description { get; }
/// <summary>
/// Gets the severity/risk level of this specific issue.
/// </summary>
public FileRiskLevel Severity { get; }
/// <summary>
/// Initializes a new instance of the <see cref="FileIssue"/> class.
/// </summary>
public FileIssue(IssueType type, string description, FileRiskLevel severity)
{
Type = type;
Description = description ?? throw new ArgumentNullException(nameof(description));
Severity = severity;
}
/// <summary>
/// Returns a string representation of the file issue.
/// </summary>
public override string ToString() => $"[{Severity}] {Type}: {Description}";
}
}