Webiant Logo Webiant Logo
  1. No results found.

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

ResetLicenseCheckTask.cs

using Nop.Core.Domain.Common;
using Nop.Services.Configuration;
using Nop.Services.ScheduleTasks;

namespace Nop.Services.Common;

/// 
/// Represents a task to reset license check
/// 
public partial class ResetLicenseCheckTask : IScheduleTask
{
    #region Fields

    protected readonly ISettingService _settingService;

    #endregion

    #region Ctor

    public ResetLicenseCheckTask(ISettingService settingService)
    {
        _settingService = settingService;
    }

    #endregion

    #region Methods

    /// 
    /// Executes a task
    /// 
    /// A task that represents the asynchronous operation
    public async Task ExecuteAsync()
    {
        await _settingService.SetSettingAsync($"{nameof(AdminAreaSettings)}.{nameof(AdminAreaSettings.CheckLicense)}", true);
    }

    #endregion
}