singrdk/base/Kernel/System/Diagnostics/Debug.cs

31 lines
798 B
C#

///////////////////////////////////////////////////////////////////////////////
//
// Microsoft Research Singularity
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
///////////////////////////////////////////////////////////////////////////////
namespace System.Diagnostics
{
public sealed class Debug {
[Conditional("DEBUG")]
public static void Assert(bool truth)
{
VTable.Assert(truth);
}
[Conditional("DEBUG")]
public static void Assert(bool truth, string statement)
{
VTable.Assert(truth, statement);
}
public static void AssertValidReference(Object obj) {
VTable.Assert(obj == null || obj.vtable != null);
}
}
}