52 return String.Format(Properties.Resources.SentenceBadFormatTokenError, ((
BadFormatTokenError)error).Token);
54 return String.Format(Properties.Resources.SentenceMissingValueOptionError, ((
MissingValueOptionError)error).NameInfo.NameText);
56 return String.Format(Properties.Resources.SentenceUnknownOptionError, ((
UnknownOptionError)error).Token);
57 case ErrorType.MissingRequiredOptionError:
60 ? Properties.Resources.SentenceMissingRequiredOptionError
61 : String.Format(Properties.Resources.SentenceMissingRequiredOptionError, errMisssing.NameInfo.NameText);
65 ? Properties.Resources.SentenceBadFormatConversionErrorValue
66 : String.Format(Properties.Resources.SentenceBadFormatConversionErrorOption, badFormat.NameInfo.NameText);
70 ? Properties.Resources.SentenceSequenceOutOfRangeErrorValue
71 : String.Format(Properties.Resources.SentenceSequenceOutOfRangeErrorOption,
72 seqOutRange.NameInfo.NameText);
74 return String.Format(Properties.Resources.SentenceBadVerbSelectedError, ((
BadVerbSelectedError)error).Token);
76 return Properties.Resources.SentenceNoVerbSelectedError;
81 return String.Format(Properties.Resources.SentenceSetValueExceptionError, setValueError.NameInfo.NameText, setValueError.Exception.Message);
83 throw new InvalidOperationException();
94 var bySet = from e in errors
95 group e by e.SetName into g
96 select
new { SetName = g.Key, Errors = g.ToList() };
98 var msgs = bySet.Select(
101 var names = String.Join(
103 (from e in
set.Errors select String.Format(
"'{0}', ", e.NameInfo.NameText)).ToArray());
104 var namesCount =
set.Errors.Count();
106 var incompat = String.Join(
109 (from s in bySet where !s.SetName.Equals(
set.SetName) from e in s.Errors select e)
111 select String.Format(
"'{0}', ", x.NameInfo.NameText)).ToArray());
114 String.Format(Properties.Resources.SentenceMutuallyExclusiveSetErrors,
115 names.Substring(0, names.Length - 2), incompat.Substring(0, incompat.Length - 2));
117 return string.Join(Environment.NewLine, msgs);