Interface INewsletterMailingListService
A service that provides operations for managing newsletter mailing lists.
Namespace: DataWeb.Newsletter
Assembly: DataWeb.Core.dll
Syntax
public interface INewsletterMailingListService
Methods
GetActiveSubscriberCountAsync(string, CancellationToken)
Gets the number of active subscribers for the mailing list with the specified name.
Declaration
Task<long> GetActiveSubscriberCountAsync(string name, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the mailing list. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<long> | The number of active subscribers for the mailing list with the specified name. |
GetActiveSubscribersAsync(string, CancellationToken)
Gets all the active subscribers for the mailing list with the specified name.
Declaration
Task<IEnumerable<NewsletterSubscriber>> GetActiveSubscribersAsync(string name, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the mailing list. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<IEnumerable<NewsletterSubscriber>> | All the active subscribers for the mailing list with the specified name. |
GetMailingListAsync(NewsletterMailingListFilter, CancellationToken)
Gets the mailing list that matches the specified filter.
Declaration
Task<NewsletterMailingList> GetMailingListAsync(NewsletterMailingListFilter filter, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
NewsletterMailingListFilter | filter | The NewsletterMailingListFilter used to retrieve the mailing list. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<NewsletterMailingList> | The mailing list that matches the specified filter. |
GetMailingListsAsync(NewsletterMailingListFilter, CancellationToken)
Gets all the mailing lists that match the specified filter.
Declaration
Task<IEnumerable<NewsletterMailingList>> GetMailingListsAsync(NewsletterMailingListFilter filter, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
NewsletterMailingListFilter | filter | The NewsletterMailingListFilter used to retrieve the mailing lists. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<IEnumerable<NewsletterMailingList>> | The mailing lists that match the specified filter. |