10 instantiations of MessageContainer
illink (10)
Linker\MessageContainer.cs (10)
55
return new
MessageContainer
(MessageCategory.Error, text, code, subcategory, origin);
71
return new
MessageContainer
(MessageCategory.Error, id, origin: origin, args: args);
93
return new
MessageContainer
(MessageCategory.Error, text, code, subcategory, origin);
175
return new
MessageContainer
(MessageCategory.WarningAsError, text, code, subcategory, origin);
177
return new
MessageContainer
(MessageCategory.Warning, text, code, subcategory, origin);
195
return new
MessageContainer
(MessageCategory.WarningAsError, id, subcategory, origin, args);
197
return new
MessageContainer
(MessageCategory.Warning, id, subcategory, origin, args);
253
return new
MessageContainer
(MessageCategory.Info, text, null);
258
return new
MessageContainer
(MessageCategory.Info, text, null, "", origin);
268
return new
MessageContainer
(MessageCategory.Diagnostic, text, null);
56 references to MessageContainer
illink (56)
Linker.Dataflow\MethodBodyScanner.cs (2)
189
throw new LinkerFatalErrorException (
MessageContainer
.CreateErrorMessage (
885
throw new LinkerFatalErrorException (
MessageContainer
.CreateErrorMessage (
Linker.Steps\DescriptorMarker.cs (1)
44
_context.LogMessage (
MessageContainer
.CreateInfoMessage (origin, $"Duplicate preserve of '{memberName}'"));
Linker.Steps\MarkStep.cs (6)
3274
throw new LinkerFatalErrorException (
MessageContainer
.CreateErrorMessage (origin, DiagnosticId.CannotStubConstructorWhenBaseTypeDoesNotHaveConstructor, method.DeclaringType.GetDisplayName ()));
3291
throw new LinkerFatalErrorException (
MessageContainer
.CreateErrorMessage (null, DiagnosticId.CouldNotFindType, "System.NotSupportedException"));
3297
throw new LinkerFatalErrorException (
MessageContainer
.CreateErrorMessage (null, DiagnosticId.CouldNotFindConstructor, nse.GetDisplayName ()));
3307
throw new LinkerFatalErrorException (
MessageContainer
.CreateErrorMessage (null, DiagnosticId.CouldNotFindConstructor, objectType.GetDisplayName ()));
3317
throw new LinkerFatalErrorException (
MessageContainer
.CreateErrorMessage (null, DiagnosticId.CouldNotFindType, "System.Runtime.CompilerServices.DisablePrivateReflectionAttribute"));
3324
throw new LinkerFatalErrorException (
MessageContainer
.CreateErrorMessage (null, DiagnosticId.CouldNotFindConstructor, disablePrivateReflection.GetDisplayName ()));
Linker.Steps\OutputStep.cs (1)
107
throw new LinkerFatalErrorException (
MessageContainer
.CreateErrorMessage (null, DiagnosticId.FailedToWriteOutput, outputName), e);
Linker.Steps\ProcessLinkerXmlBase.cs (1)
95
throw new LinkerFatalErrorException (
MessageContainer
.CreateErrorMessage (null, DiagnosticId.ErrorProcessingXmlLocation, _xmlDocumentLocation), ex);
Linker\ConsoleLogger.cs (1)
10
public void LogMessage (
MessageContainer
message)
Linker\ILogger.cs (1)
8
void LogMessage (
MessageContainer
message);
Linker\LinkContext.cs (17)
76
readonly List<
MessageContainer
> _cachedWarningMessageContainers;
211
_cachedWarningMessageContainers = new List<
MessageContainer
> ();
530
public void LogMessage (
MessageContainer
message)
532
if (message ==
MessageContainer
.Empty)
555
LogMessage (
MessageContainer
.CreateInfoMessage (message));
563
LogMessage (
MessageContainer
.CreateDiagnosticMessage (message));
579
MessageContainer
warning =
MessageContainer
.CreateWarningMessage (this, text, code, origin, version, subcategory);
594
MessageContainer
warning =
MessageContainer
.CreateWarningMessage (this, origin, id, version, args);
679
var
error =
MessageContainer
.CreateErrorMessage (text, code, subcategory, origin);
691
var
error =
MessageContainer
.CreateErrorMessage (origin, id, args);
705
throw new LinkerFatalErrorException (
MessageContainer
.CreateErrorMessage (text, code, subcategory, origin));
719
throw new LinkerFatalErrorException (
MessageContainer
.CreateErrorMessage (text, code, subcategory, origin), innerException);
725
foreach (
var
warning in _cachedWarningMessageContainers)
Linker\LinkerFatalErrorException.cs (3)
14
public
MessageContainer
MessageContainer { get; }
17
public LinkerFatalErrorException (
MessageContainer
message)
31
public LinkerFatalErrorException (
MessageContainer
message, Exception innerException)
Linker\MessageContainer.cs (23)
14
public readonly struct MessageContainer : IComparable<
MessageContainer
>, IEquatable<
MessageContainer
>
16
public static readonly
MessageContainer
Empty;
50
internal static
MessageContainer
CreateErrorMessage (string text, int code, string subcategory = MessageSubCategory.None, MessageOrigin? origin = null)
66
internal static
MessageContainer
CreateErrorMessage (MessageOrigin? origin, DiagnosticId id, params string[] args)
83
public static
MessageContainer
CreateCustomErrorMessage (string text, int code, string subcategory = MessageSubCategory.None, MessageOrigin? origin = null)
86
Debug.Assert (Assembly.GetCallingAssembly () != typeof (
MessageContainer
).Assembly,
108
internal static
MessageContainer
CreateWarningMessage (LinkContext context, string text, int code, MessageOrigin origin, WarnVersion version, string subcategory = MessageSubCategory.None)
127
internal static
MessageContainer
CreateWarningMessage (LinkContext context, MessageOrigin origin, DiagnosticId id, WarnVersion version, params string[] args)
147
public static
MessageContainer
CreateCustomWarningMessage (LinkContext context, string text, int code, MessageOrigin origin, WarnVersion version, string subcategory = MessageSubCategory.None)
150
Debug.Assert (Assembly.GetCallingAssembly () != typeof (
MessageContainer
).Assembly,
160
private static
MessageContainer
CreateWarningMessageContainer (LinkContext context, string text, int code, MessageOrigin origin, WarnVersion version, string subcategory = MessageSubCategory.None)
180
private static
MessageContainer
CreateWarningMessageContainer (LinkContext context, MessageOrigin origin, DiagnosticId id, WarnVersion version, string subcategory, params string[] args)
251
public static
MessageContainer
CreateInfoMessage (string text)
256
internal static
MessageContainer
CreateInfoMessage (MessageOrigin origin, string text)
266
public static
MessageContainer
CreateDiagnosticMessage (string text)
347
public bool Equals (
MessageContainer
other) =>
350
public override bool Equals (object? obj) => obj is
MessageContainer
messageContainer && Equals (messageContainer);
353
public int CompareTo (
MessageContainer
other)
364
public static bool operator == (
MessageContainer
lhs,
MessageContainer
rhs) => lhs.Equals (rhs);
365
public static bool operator != (
MessageContainer
lhs,
MessageContainer
rhs) => !lhs.Equals (rhs);