protected static string ConvertIEnumToString(IEnumerable value) { StringBuilder strBuilder = new StringBuilder(); foreach (object o in value) { if (strBuilder.Length != 0) { strBuilder.Append(' '); } strBuilder.Append((!(o is IEnumerable) || o is string?o.ToString() : LinqToXsdException.ConvertIEnumToString(o as IEnumerable))); } strBuilder.Insert(0, '('); strBuilder.Append(')'); return(strBuilder.ToString()); }
protected static string CreateMessage(string facetName, object facetValue, object value) { return(LinqToXsdException.CreateMessage(facetName, (!(facetValue is IEnumerable) || facetValue is string?facetValue.ToString() : LinqToXsdException.ConvertIEnumToString(facetValue as IEnumerable)), (!(value is IEnumerable) || facetValue is string?value.ToString() : LinqToXsdException.ConvertIEnumToString(value as IEnumerable)))); }