2008-11-17 18:29:00 -05:00
|
|
|
// ----------------------------------------------------------------------------
|
2008-03-05 09:52:00 -05:00
|
|
|
//
|
|
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
//
|
2008-11-17 18:29:00 -05:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
using Microsoft.Singularity;
|
2008-03-05 09:52:00 -05:00
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
2008-11-17 18:29:00 -05:00
|
|
|
|
|
|
|
public static void WriteLine(string text)
|
|
|
|
{
|
|
|
|
if (text == null)
|
|
|
|
text = "";
|
|
|
|
DebugStub.WriteLine(text);
|
|
|
|
}
|
|
|
|
|
2008-03-05 09:52:00 -05:00
|
|
|
}
|
|
|
|
}
|