using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MegaRobo.C00225155.ControlDevices
{
    /// <summary>
    /// 解析结果封装（包含成功状态、描述、数据）
    /// </summary>
    public class ParseResult
    {
        /// <summary>
        /// 解析是否成功
        /// </summary>
        public bool IsSuccess { get; }

        /// <summary>
        /// 解析描述（成功/失败原因）
        /// </summary>
        public string Description { get; }

        /// <summary>
        /// 解析后的数据（Key-Value结构，根据指令类型不同内容不同）
        /// </summary>
        public Dictionary<string, object> Data { get; }

        public ParseResult(bool isSuccess, string description, Dictionary<string, object> data)
        {
            IsSuccess = isSuccess;
            Description = description;
            Data = data ?? new Dictionary<string, object>();
        }
    }


}
