Interface IAutomationProfileStore
Represents a store for automation profiles.
Namespace: DataWeb.Automation
Assembly: DataWeb.Core.dll
Syntax
public interface IAutomationProfileStore
Properties
Name
Gets the name of the automation profile store.
Declaration
string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
DeleteAsync(string, string, CancellationToken)
Deletes an automation profile from storage.
Declaration
Task DeleteAsync(string automationProfileId, string email, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | automationProfileId | The unique identifier of the automation profile to delete. |
| string | The email address associated with the automation profile. |
|
| CancellationToken | cancellationToken | A token to cancel the asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Thrown when |
GetProfileAsync(AutomationProfileFilter, CancellationToken)
Retrieves the first automation profile matching the specified filter, or null if none is found.
Declaration
Task<AutomationProfile> GetProfileAsync(AutomationProfileFilter filter, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| AutomationProfileFilter | filter | The filter criteria used to query the automation profile. |
| CancellationToken | cancellationToken | A token to cancel the asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task<AutomationProfile> | The first matching AutomationProfile, or null. |
GetProfileCountAsync(AutomationProfileFilter, CancellationToken)
Returns the total number of automation profiles matching the specified filter.
Declaration
Task<long> GetProfileCountAsync(AutomationProfileFilter filter, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| AutomationProfileFilter | filter | The filter criteria used to count automation profiles. |
| CancellationToken | cancellationToken | A token to cancel the asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task<long> | The count of matching automation profiles. |
GetProfilesAsync(AutomationProfileFilter, CancellationToken)
Retrieves a collection of automation profiles matching the specified filter.
Declaration
Task<IEnumerable<AutomationProfile>> GetProfilesAsync(AutomationProfileFilter filter, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| AutomationProfileFilter | filter | The filter criteria used to query automation profiles. |
| CancellationToken | cancellationToken | A token to cancel the asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<AutomationProfile>> | A collection of AutomationProfile matching the filter. |
ProfileExistsAsync(AutomationProfileFilter, CancellationToken)
Determines whether an automation profile matching the specified filter exists.
Declaration
Task<bool> ProfileExistsAsync(AutomationProfileFilter filter, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| AutomationProfileFilter | filter | The filter criteria used to check for an existing automation profile. |
| CancellationToken | cancellationToken | A token to cancel the asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task<bool> | true if a matching automation profile exists; otherwise false. |
SetAsync(AutomationProfile, CancellationToken)
Persists a new or updated automation profile to the store.
Declaration
Task SetAsync(AutomationProfile automationProfile, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| AutomationProfile | automationProfile | The automation profile to save. |
| CancellationToken | cancellationToken | A token to cancel the asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
SetModificationDateAsync(string, string, DateTimeOffset, CancellationToken)
Updates the modification date of an automation profile.
Declaration
Task SetModificationDateAsync(string automationProfileId, string automationProfileEmail, DateTimeOffset modificationDate, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | automationProfileId | The unique identifier of the automation profile. |
| string | automationProfileEmail | The email associated with the automation profile. |
| DateTimeOffset | modificationDate | The new modification date to set. |
| CancellationToken | cancellationToken | A token to cancel the asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Thrown when |
SetNewsletterStatusAsync(string, string, AutomationProfileNotificationStatus, CancellationToken)
Updates the newsletter status of an automation profile.
Declaration
Task SetNewsletterStatusAsync(string automationProfileId, string automationProfileEmail, AutomationProfileNotificationStatus status, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | automationProfileId | The unique identifier of the automation profile. |
| string | automationProfileEmail | The email associated with the automation profile. |
| AutomationProfileNotificationStatus | status | The new newsletter status to set. |
| CancellationToken | cancellationToken | A token to cancel the asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Thrown when |
SetNewsletterSubscriptionDateAsync(string, string, DateTimeOffset, CancellationToken)
Updates the newsletter subscription date of an automation profile.
Declaration
Task SetNewsletterSubscriptionDateAsync(string automationProfileId, string automationProfileEmail, DateTimeOffset newsletterSubscriptionDate, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | automationProfileId | The unique identifier of the automation profile. |
| string | automationProfileEmail | The email associated with the automation profile. |
| DateTimeOffset | newsletterSubscriptionDate | The new subscription date to set. |
| CancellationToken | cancellationToken | A token to cancel the asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Thrown when |
SetNotificationAppStatusAsync(string, string, AutomationProfileNotificationStatus, CancellationToken)
Updates the app notification status of an automation profile.
Declaration
Task SetNotificationAppStatusAsync(string automationProfileId, string automationProfileEmail, AutomationProfileNotificationStatus status, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | automationProfileId | The unique identifier of the automation profile. |
| string | automationProfileEmail | The email associated with the automation profile. |
| AutomationProfileNotificationStatus | status | The new notification status to set. |
| CancellationToken | cancellationToken | A token to cancel the asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Thrown when |
SetNotificationEmailStatusAsync(string, string, AutomationProfileNotificationStatus, CancellationToken)
Updates the email notification status of an automation profile.
Declaration
Task SetNotificationEmailStatusAsync(string automationProfileId, string automationProfileEmail, AutomationProfileNotificationStatus status, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | automationProfileId | The unique identifier of the automation profile. |
| string | automationProfileEmail | The email associated with the automation profile. |
| AutomationProfileNotificationStatus | status | The new notification status to set. |
| CancellationToken | cancellationToken | A token to cancel the asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Thrown when |
SetNotificationPhoneStatusAsync(string, string, AutomationProfileNotificationStatus, CancellationToken)
Updates the phone notification status of an automation profile.
Declaration
Task SetNotificationPhoneStatusAsync(string automationProfileId, string automationProfileEmail, AutomationProfileNotificationStatus status, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | automationProfileId | The unique identifier of the automation profile. |
| string | automationProfileEmail | The email associated with the automation profile. |
| AutomationProfileNotificationStatus | status | The new notification status to set. |
| CancellationToken | cancellationToken | A token to cancel the asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Thrown when |
SetStatusAsync(string, string, AutomationProfileStatus, CancellationToken)
Updates the status of an automation profile.
Declaration
Task SetStatusAsync(string automationProfileId, string automationProfileEmail, AutomationProfileStatus status, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | automationProfileId | The unique identifier of the automation profile. |
| string | automationProfileEmail | The email associated with the automation profile. |
| AutomationProfileStatus | status | The new status to set. |
| CancellationToken | cancellationToken | A token to cancel the asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Thrown when |