Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

SynchronizationTask.cs

using Nop.Services.ScheduleTasks;

namespace Nop.Plugin.Misc.Brevo.Services;

/// 
/// Represents a schedule task to synchronize contacts
/// 
public class SynchronizationTask : IScheduleTask
{
    #region Fields

    protected readonly BrevoManager _brevoEmailManager;

    #endregion

    #region Ctor

    public SynchronizationTask(BrevoManager brevoEmailManager)
    {
        _brevoEmailManager = brevoEmailManager;
    }

    #endregion

    #region Methods

    /// 
    /// Execute task
    /// 
    /// A task that represents the asynchronous operation
    public async Task ExecuteAsync()
    {
        await _brevoEmailManager.SynchronizeAsync();
    }

    #endregion
}