Interface INewsletterModelService
Provides methods for working with newsletter models.
Namespace: DataWeb.Newsletter
Assembly: DataWeb.Core.dll
Syntax
public interface INewsletterModelService
Methods
GetCreditsAsync(ProvisioningApp, CancellationToken)
Retrieves the credits for the specified provisioning app.
Declaration
Task<NewsletterCredits> GetCreditsAsync(ProvisioningApp app, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
ProvisioningApp | app | The ProvisioningApp to retrieve credits for. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<NewsletterCredits> | A task representing the asynchronous operation that returns the credits for the specified app. |
GetModelAsync(NewsletterModelFilter, CancellationToken)
Retrieves a newsletter model that matches the specified filter criteria.
Declaration
Task<NewsletterModel> GetModelAsync(NewsletterModelFilter filter, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
NewsletterModelFilter | filter | The NewsletterModelFilter to match. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<NewsletterModel> | A task representing the asynchronous operation that returns the matched newsletter model. |
GetModelsAsync(NewsletterModelFilter, CancellationToken)
Retrieves a collection of newsletter models that match the specified filter criteria.
Declaration
Task<IEnumerable<NewsletterModel>> GetModelsAsync(NewsletterModelFilter filter, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
NewsletterModelFilter | filter | The NewsletterModelFilter to match. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<IEnumerable<NewsletterModel>> | A task representing the asynchronous operation that returns a collection of matched newsletter models. |
RenderBodyAsync(NewsletterModel, string, CancellationToken)
Renders the body of a newsletter model using the specified row IdMaster.
Declaration
Task<string> RenderBodyAsync(NewsletterModel newsletterModel, string newsletterRowIdMaster = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
NewsletterModel | newsletterModel | The NewsletterModel to render. |
string | newsletterRowIdMaster | The row IdMaster to use for rendering. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<string> | A task representing the asynchronous operation that returns the rendered body of the newsletter model. |