示例#1
0
        public static void Fail(object thisOrContextObject, FormattableString formattableString, [CallerMemberName] string memberName = null)
        {
            // Don't call DebugValidateArg on args, as we expect Fail to be used in assert/failure situations
            // that should never happen in production, and thus we don't care about extra costs.

            if (IsEnabled)
            {
                Log.CriticalFailure(IdOf(thisOrContextObject), memberName, Format(formattableString));
            }
            Debug.Fail(Format(formattableString), $"{IdOf(thisOrContextObject)}.{memberName}");
        }