string GetErrorDescriptionFor(string messageId, bool brief = false)
        {
            if (brief)
            {
                return(_errorTracker.GetShortErrorDescription(messageId));
            }

            return(_errorTracker.GetFullErrorDescription(messageId));
        }
Example #2
0
        string GetErrorDescriptionFor(string messageId, bool brief = false)
        {
            var secondLevelMessageId = GetSecondLevelMessageId(messageId);

            if (brief)
            {
                var secondLevelErrorDescription = _errorTracker.GetShortErrorDescription(secondLevelMessageId);
                var firstLevelErrorDescription  = _errorTracker.GetShortErrorDescription(messageId);

                return(secondLevelErrorDescription == null
                    ? firstLevelErrorDescription
                    : string.Join(Environment.NewLine, firstLevelErrorDescription, secondLevelErrorDescription));
            }
            else
            {
                var secondLevelErrorDescription = _errorTracker.GetFullErrorDescription(secondLevelMessageId);
                var firstLevelErrorDescription  = _errorTracker.GetFullErrorDescription(messageId);

                return(secondLevelErrorDescription == null
                    ? firstLevelErrorDescription
                    : string.Join(Environment.NewLine, firstLevelErrorDescription, secondLevelErrorDescription));
            }
        }
 public string GetShortErrorDescription(string messageId)
 {
     return(_innerErrorTracker.GetShortErrorDescription(messageId));
 }