private void RetrieveArticleCore(string command, IArticleHeadersProcessor headers, IArticleBodyProcessor body) { //body.SetCapacity(5000); bool readingHeader = true; foreach (string s in DoArticleCommand(command, Rfc977ResponseCodes.ArticleRetrieved)) { if (readingHeader) { if (s.Length == 0) { readingHeader = false; } else { headers.AddHeader(s); } } else { body.AddText(s); } } }
/// <summary> /// Retrieves the article for the specified message id. /// </summary> /// <param name="messageId">The message id.</param> /// <param name="header">The header.</param> /// <param name="body">The body.</param> public virtual void RetrieveArticle(string messageId, IArticleHeadersProcessor header, IArticleBodyProcessor body) { ValidateMessageIdArgument(messageId); RetrieveArticleCore("ARTICLE " + messageId, header, body); }
/// <summary> /// Retrieves the article for the specified article id. /// </summary> /// <param name="articleId">The article id.</param> /// <param name="header">The header.</param> /// <param name="body">The body.</param> public virtual void RetrieveArticle(int articleId, IArticleHeadersProcessor header, IArticleBodyProcessor body) { RetrieveArticleCore("ARTICLE " + articleId, header, body); }
private void RetrieveArticleCore(string command, IArticleHeadersProcessor headers, IArticleBodyProcessor body) { bool readingHeader = true; foreach (string s in DoArticleCommand(command, Rfc977ResponseCodes.ArticleRetrieved)) { if (readingHeader) { if (s.Length == 0) { readingHeader = false; } else { headers.AddHeader(s); } } else { body.AddText(s); } } }