public string ObterInformacoes() { if (Informacoes.Any()) { return(string.Join(", ", Informacoes.Select(item => $"{ item.Mensagem }"))); } return(string.Empty); }
public string ConsolidaMensagem(string separador) { if (Informacoes.Any()) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < Informacoes.Count; ++i) { if (Informacoes[i].Length > 0) { sb.Append(Informacoes[i]); if (i < (Informacoes.Count - 1)) { sb.Append(separador); } } } return(sb.ToString()); } else { return(string.Empty); } }