Setup entry point + integrated moonworks stuff

This commit is contained in:
2024-07-05 14:32:58 +02:00
parent e7a4a862be
commit 8334a24fd1
116 changed files with 16988 additions and 3 deletions
+24
View File
@@ -0,0 +1,24 @@
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
namespace Nerfed.Runtime;
public class AssertionException(string msg) : Exception(msg);
public static class Assert
{
[Conditional("DEBUG"), DebuggerHidden]
public static void Debug([DoesNotReturnIf(false)] bool cond, [CallerArgumentExpression("cond")] string expression = "") {
if (!cond) {
throw new AssertionException(expression);
}
}
[DebuggerHidden]
public static void Always([DoesNotReturnIf(false)] bool cond, [CallerArgumentExpression("cond")] string expression = "") {
if (!cond) {
throw new AssertionException(expression);
}
}
}