private FormatSummaryItems ( MessageSummaryItems &items, HashSet |
||
items | MessageSummaryItems | |
fields | HashSet |
|
return | string |
/// <summary> /// Format the IMAP NOTIFY command for this particular IMAP mailbox filter. /// </summary> /// <remarks> /// Formats the IMAP NOTIFY command for this particular IMAP mailbox filter. /// </remarks> /// <param name="engine">The IMAP engine.</param> /// <param name="command">The IMAP command builder.</param> /// <param name="args">The IMAP command argument builder.</param> /// <param name="isSelectedFilter"><c>true</c> if the event is being registered for a /// <see cref="ImapMailboxFilter.Selected"/> or <see cref="ImapMailboxFilter.SelectedDelayed"/> /// mailbox filter.</param> internal override void Format(ImapEngine engine, StringBuilder command, IList <object> args, bool isSelectedFilter) { command.Append(Name); if (ImapFolder.IsEmptyFetchRequest(request)) { return; } if (!isSelectedFilter) { throw new InvalidOperationException("The MessageNew event cannot have any parameters for mailbox filters other than SELECTED and SELECTED-DELAYED."); } command.Append(" "); command.Append(ImapFolder.FormatSummaryItems(engine, request, out _, isNotify: true)); }
/// <summary> /// Format the IMAP NOTIFY command for this particular IMAP mailbox filter. /// </summary> /// <remarks> /// Formats the IMAP NOTIFY command for this particular IMAP mailbox filter. /// </remarks> /// <param name="engine">The IMAP engine.</param> /// <param name="command">The IMAP command builder.</param> /// <param name="args">The IMAP command argument builder.</param> /// <param name="isSelectedFilter"><c>true</c> if the event is being registered for a /// <see cref="ImapMailboxFilter.Selected"/> or <see cref="ImapMailboxFilter.SelectedDelayed"/> /// mailbox filter.</param> internal override void Format(ImapEngine engine, StringBuilder command, IList <object> args, bool isSelectedFilter) { command.Append(Name); if (items == MessageSummaryItems.None && headers.Count == 0) { return; } if (!isSelectedFilter) { throw new InvalidOperationException("The MessageNew event cannot have any parameters for mailbox filters other than SELECTED and SELECTED-DELAYED."); } var xitems = items; bool previewText; command.Append(" "); command.Append(ImapFolder.FormatSummaryItems(engine, ref xitems, headers, out previewText, isNotify: true)); }