34 lines
1.2 KiB
C#
34 lines
1.2 KiB
C#
using System.Collections.Immutable;
|
|||
|
|
|
||
|
|
namespace Microsoft.CodeAnalysis.CSharp;
|
||
|
|
|
||
|
|
internal class DiagnosticInfoWithSymbols : DiagnosticInfo
|
||
|
|
{
|
||
|
|
internal readonly ImmutableArray<Symbol> Symbols;
|
||
|
|
|
||
|
|
internal DiagnosticInfoWithSymbols(ErrorCode errorCode, object[] arguments, ImmutableArray<Symbol> symbols)
|
||
|
|
: base((CommonMessageProvider)(object)MessageProvider.Instance, (int)errorCode, arguments)
|
||
|
|
{
|
||
|
|
Symbols = symbols;
|
||
|
|
}
|
||
|
|
|
||
|
|
internal DiagnosticInfoWithSymbols(bool isWarningAsError, ErrorCode errorCode, object[] arguments, ImmutableArray<Symbol> symbols)
|
||
|
|
: base((CommonMessageProvider)(object)MessageProvider.Instance, isWarningAsError, (int)errorCode, arguments)
|
||
|
|
{
|
||
|
|
Symbols = symbols;
|
||
|
|
}
|
||
|
|
|
||
|
|
protected DiagnosticInfoWithSymbols(DiagnosticInfoWithSymbols original, DiagnosticSeverity severity)
|
||
|
|
: base((DiagnosticInfo)(object)original, severity)
|
||
|
|
{
|
||
|
|
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
|
||
|
|
Symbols = original.Symbols;
|
||
|
|
}
|
||
|
|
|
||
|
|
protected override DiagnosticInfo GetInstanceWithSeverityCore(DiagnosticSeverity severity)
|
||
|
|
{
|
||
|
|
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
|
||
|
|
return (DiagnosticInfo)(object)new DiagnosticInfoWithSymbols(this, severity);
|
||
|
|
}
|
||
|
|
}
|