using JiShe.CollectBus.Protocol.Interfaces;
using Microsoft.Extensions.Logging;

namespace JiShe.CollectBus.Protocol.T37612012.Appendix
{
    /// <summary>
    /// 日时段数(每日切换数) m≤14
    /// </summary>
    public class Appendix_04000203 : IAnalysisStrategy<List<string>>
    {
        private readonly ILogger<Appendix_04000203> _logger;
        private readonly AnalysisStrategyContext _analysisStrategyContext;

        public Appendix_04000203(ILogger<Appendix_04000203> logger, AnalysisStrategyContext analysisStrategyContext)
        {
            _logger = logger;
            _analysisStrategyContext = analysisStrategyContext;
        }

        public async Task<bool> ExecuteAsync(List<string> data, Action<dynamic>? result = null)
        {
            return await _analysisStrategyContext.ExecuteAsync<List<string>>(nameof(Appendix_04000201), data, (values) =>
            {
                values[0] = "日时段数(每日切换数)";
                result?.Invoke(values);
            });
        }
    }
}
