Interface INewsletterSubscriberService
Provides operations for managing newsletter subscribers.
Assembly: DataWeb.Core.dll
Syntax
public interface INewsletterSubscriberService
Methods
ConfirmEmailAsync(NewsletterSubscriber, string, CancellationToken)
Declaration
Task<ConfirmEmailResult> ConfirmEmailAsync(NewsletterSubscriber subscriber, string code, CancellationToken cancellationToken = default)
Parameters
Returns
ConvertStatus(string)
Converts the given value to a subscriber status.
Declaration
SubscriberStatus ConvertStatus(string value)
Parameters
Type |
Name |
Description |
string |
value |
|
Returns
DeserializeAdditionalValues(string)
Deserializes the additional values of a subscriber.
Declaration
List<NewsletterSubscriber.AdditionalValue> DeserializeAdditionalValues(string value)
Parameters
Type |
Name |
Description |
string |
value |
|
Returns
GenerateEmailConfirmationToken(NewsletterSubscriber)
Declaration
string GenerateEmailConfirmationToken(NewsletterSubscriber subscriber)
Parameters
Returns
GetSMTPErrors()
Gets a list of SMTP errors.
Declaration
List<List.ListItem> GetSMTPErrors()
Returns
GetSubscriberAsync(NewsletterSubscriberFilter, CancellationToken)
Declaration
Task<NewsletterSubscriber> GetSubscriberAsync(NewsletterSubscriberFilter filter, CancellationToken cancellationToken = default)
Parameters
Returns
GetSubscriberCountAsync(NewsletterSubscriberFilter, CancellationToken)
Declaration
Task<long> GetSubscriberCountAsync(NewsletterSubscriberFilter filter, CancellationToken cancellationToken = default)
Parameters
Returns
GetSubscribersAsync(NewsletterSubscriberFilter, CancellationToken)
Declaration
Task<IEnumerable<NewsletterSubscriber>> GetSubscribersAsync(NewsletterSubscriberFilter filter, CancellationToken cancellationToken = default)
Parameters
Returns
MergeAdditionalValues(List<AdditionalValue>, List<AdditionalValue>)
Merges a list of existing additional values with a list of provided additional values.
Declaration
List<NewsletterSubscriber.AdditionalValue> MergeAdditionalValues(List<NewsletterSubscriber.AdditionalValue> existingAdditionalValues, List<NewsletterSubscriber.AdditionalValue> providedAdditionalValues)
Parameters
Returns
MergeStringValues(List<string>, List<string>)
Merges a list of existing string values with a list of provided string values.
Declaration
List<string> MergeStringValues(List<string> existingValues, List<string> providedValues)
Parameters
Returns
RemoveAsync(string, CancellationToken)
Removes the subscriber with the given Id.
Declaration
Task RemoveAsync(string id, CancellationToken cancellationToken = default)
Parameters
Returns
RemoveGroupAsync(string, string, CancellationToken)
Removes the given group from the subscriber.
Declaration
Task RemoveGroupAsync(string subscriberId, string group, CancellationToken cancellationToken = default)
Parameters
Returns
SendEmailConfirmAsync(NewsletterSubscriber, string, CancellationToken)
Declaration
Task SendEmailConfirmAsync(NewsletterSubscriber subscriber, string emailConfirmUrl, CancellationToken cancellationToken = default)
Parameters
Returns
SerializeAdditionalValues(List<AdditionalValue>)
Serializes the additional values of a subscriber.
Declaration
string SerializeAdditionalValues(List<NewsletterSubscriber.AdditionalValue> additionalValues)
Parameters
Returns
SetAsync(NewsletterSubscriber, CancellationToken)
Declaration
Task SetAsync(NewsletterSubscriber subscriber, CancellationToken cancellationToken = default)
Parameters
Returns
SubscribeAsync(string, string, string, string, string, List<string>, List<string>, List<AdditionalValue>, bool, bool, CancellationToken)
Subscribes a new email address to the newsletter.
Declaration
Task<SubscribeResult> SubscribeAsync(string email, string culture, string source, string country = null, string zone = null, List<string> interests = null, List<string> groups = null, List<NewsletterSubscriber.AdditionalValue> additionalValues = null, bool isKeepStatus = false, bool isRequireConfirmedEmail = false, CancellationToken cancellationToken = default)
Parameters
Returns
UnsubscribeAsync(string, CancellationToken)
Unsubscribes the email address from the newsletter.
Declaration
Task<UnsubscribeResult> UnsubscribeAsync(string email, CancellationToken cancellationToken = default)
Parameters
Returns