Class NewsletterMailingListService
A service that provides operations for managing newsletter mailing lists.
Implements
Inherited Members
Namespace: DataWeb.Newsletter
Assembly: DataWeb.Core.dll
Syntax
public class NewsletterMailingListService : INewsletterMailingListService
Remarks
Initializes a new instance of the NewsletterMailingListService class.
Constructors
NewsletterMailingListService(IReflectionService, IAppErrorService, INewsletterSubscriberService, INewsletterMailingListStore, IServiceProvider)
A service that provides operations for managing newsletter mailing lists.
Declaration
public NewsletterMailingListService(IReflectionService reflectionService, IAppErrorService appErrorService, INewsletterSubscriberService subscriberService, INewsletterMailingListStore mailingListStore, IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
IReflectionService | reflectionService | The reflection service. |
IAppErrorService | appErrorService | The application error service. |
INewsletterSubscriberService | subscriberService | The subscriber service. |
INewsletterMailingListStore | mailingListStore | The mailing list store. |
IServiceProvider | serviceProvider | The service provider. |
Remarks
Initializes a new instance of the NewsletterMailingListService class.
Methods
GetActiveSubscriberCountAsync(string, CancellationToken)
Gets the number of active subscribers for the mailing list with the specified name.
Declaration
public 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
public 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
public 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
public 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. |