mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-09-18 02:15:34 +08:00
Adding polysharp properly
This commit is contained in:

committed by
Patrik Svensson

parent
c7c3ebdf57
commit
e1d21e7e61
@@ -1,12 +1,15 @@
|
||||
namespace Spectre.Console;
|
||||
|
||||
#pragma warning disable IL2026,IL2070,IL2075,IL3050
|
||||
|
||||
// ExceptionFormatter relies heavily on reflection of types unknown until runtime.
|
||||
// We'll suppress these warnings, but alert the user this method is not supported.
|
||||
[UnconditionalSuppressMessage("AssemblyLoadTrimming", "IL2026:RequiresUnreferencedCode")]
|
||||
[UnconditionalSuppressMessage("AssemblyLoadTrimming", "IL2070:RequiresUnreferencedCode")]
|
||||
[UnconditionalSuppressMessage("AssemblyLoadTrimming", "IL2075:RequiresUnreferencedCode")]
|
||||
[RequiresDynamicCode(AotWarning)]
|
||||
internal static class ExceptionFormatter
|
||||
{
|
||||
public const string AotWarning = "ExceptionFormatter is currently not supported for AOT.";
|
||||
|
||||
[RequiresDynamicCode(ExceptionFormatter.AotWarning)]
|
||||
public static IRenderable Format(Exception exception, ExceptionSettings settings)
|
||||
{
|
||||
if (exception is null)
|
||||
|
Reference in New Issue
Block a user