Beispiel #1
0
        public Article RetrieveArticle(string messageId)
        {
            var response = _connection.Article(messageId);

            if (response.Lines == null)
            {
                return(null);
            }

            var articleLines = response.Lines.ToList();

            var headers = articleLines.TakeWhile(x => !string.IsNullOrWhiteSpace(x)).Select(Header.Create);
            var body    = articleLines.SkipWhile(x => !string.IsNullOrWhiteSpace(x)).Skip(1).ToList();

            return(new Article(headers, body));
        }