/
ErrorLogOptions.cs
40 lines (35 loc) · 1.31 KB
/
ErrorLogOptions.cs
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
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
namespace Microsoft.CodeAnalysis
{
/// <summary>
/// Options controlling the generation of a SARIF log file containing compilation or analyzer diagnostics.
/// </summary>
public sealed class ErrorLogOptions
{
/// <summary>
/// Absolute path of the error log file.
/// </summary>
public string Path { get; }
/// <summary>
/// Version of the SARIF format used in the error log.
/// </summary>
public SarifVersion SarifVersion { get; }
/// <summary>
/// Initializes a new instance of the <see cref="ErrorLogOptions"/> class.
/// </summary>
/// <param name="path">Absolute path of the error log file.</param>
/// <param name="sarifVersion">Version of the SARIF format used in the error log.</param>
public ErrorLogOptions(string path, SarifVersion sarifVersion)
{
if (string.IsNullOrEmpty(path))
{
throw new ArgumentNullException(nameof(path));
}
Path = path;
SarifVersion = sarifVersion;
}
}
}