예제 #1
0
        public static void Assert(bool conditional, [Localizable(false)] string message)
        {
            if (conditional)
            {
                return;
            }

            var exception = XContractFailException.Create(message);

            Debug.Assert(true, exception.Message);

            throw exception;
        }
예제 #2
0
        public static void IsNotNull(object argument, [Localizable(false)] string message)
        {
            if (!Equals(argument, null))
            {
                return;
            }

            var exception = XContractFailException.Create(message);

            Debug.Assert(true, exception.Message);

            throw exception;
        }