Skip to content

Commit

Permalink
Added more convenience APIs for ImapEventGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
jstedfast committed Sep 14, 2023
1 parent 5635ac0 commit f1c5f83
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions MailKit/Net/Imap/ImapEventGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,23 @@ public ImapEventGroup (ImapMailboxFilter mailboxFilter, IList<ImapEvent> events)
Events = events;
}

/// <summary>
/// Initializes a new instance of the <see cref="T:MailKit.Net.Imap.ImapEventGroup"/> class.
/// </summary>
/// <remarks>
/// Initializes a new instance of the <see cref="T:MailKit.Net.Imap.ImapEventGroup"/> class.
/// </remarks>
/// <param name="mailboxFilter">The mailbox filter.</param>
/// <param name="events">The list of IMAP events.</param>
/// <exception cref="System.ArgumentNullException">
/// <para><paramref name="mailboxFilter"/> is <c>null</c>.</para>
/// <para>-or-</para>
/// <para><paramref name="events"/> is <c>null</c>.</para>
/// </exception>
public ImapEventGroup (ImapMailboxFilter mailboxFilter, params ImapEvent[] events) : this (mailboxFilter, (IList<ImapEvent>) events)
{
}

/// <summary>
/// Get the mailbox filter.
/// </summary>
Expand Down Expand Up @@ -645,9 +662,8 @@ public MessageNew (IFetchRequest request) : base ("MessageNew", true)
/// Initializes a new instance of the <see cref="T:MailKit.Net.Imap.ImapEvent.MessageNew"/> class.
/// </remarks>
/// <param name="items">The message summary items to automatically retrieve for new messages.</param>
public MessageNew (MessageSummaryItems items = MessageSummaryItems.None) : base ("MessageNew", true)
public MessageNew (MessageSummaryItems items = MessageSummaryItems.None) : this (new FetchRequest (items))
{
request = new FetchRequest (items);
}

/// <summary>
Expand All @@ -664,9 +680,8 @@ public MessageNew (MessageSummaryItems items = MessageSummaryItems.None) : base
/// <exception cref="ArgumentException">
/// <para>One or more of the specified <paramref name="headers"/> is invalid.</para>
/// </exception>
public MessageNew (MessageSummaryItems items, IEnumerable<HeaderId> headers) : base ("MessageNew", true)
public MessageNew (MessageSummaryItems items, IEnumerable<HeaderId> headers) : this (new FetchRequest (items, headers))
{
request = new FetchRequest (items, headers);
}

/// <summary>
Expand All @@ -683,9 +698,8 @@ public MessageNew (MessageSummaryItems items, IEnumerable<HeaderId> headers) : b
/// <exception cref="ArgumentException">
/// <para>One or more of the specified <paramref name="headers"/> is invalid.</para>
/// </exception>
public MessageNew (MessageSummaryItems items, IEnumerable<string> headers) : base ("MessageNew", true)
public MessageNew (MessageSummaryItems items, IEnumerable<string> headers) : this (new FetchRequest (items, headers))
{
request = new FetchRequest (items, headers);
}

/// <summary>
Expand Down

0 comments on commit f1c5f83

Please sign in to comment.