예제 #1
0
파일: DbgUtil.cs 프로젝트: zhaopengh/corefx
        public static void AssertWin32(bool expression, string message)
        {
#if DEBUG
            if (!expression)
            {
                Debug.Fail(message + "\r\nError: " + DbgUtil.GetLastErrorStr());
            }
#endif
        }
예제 #2
0
파일: DbgUtil.cs 프로젝트: zhaopengh/corefx
        [Conditional("DEBUG")] // This code will be compiled into the assembly anyways, it is up to the compiler to ignore the call.
        private static void AssertWin32Impl(bool expression, string format, object[] args)
        {
#if DEBUG
            if (!expression)
            {
                string message = string.Format(CultureInfo.CurrentCulture, format, args);
                Debug.Fail(message + "\r\nError: " + DbgUtil.GetLastErrorStr());
            }
#endif
        }