using FLY.Thick.Base.Common;
using FLY.Thick.Base.IService;
using System;

namespace FLY.Thick.Base.Client
{
    /// <summary>
    /// AD 曲线服务 客户端代理
    /// </summary>
    public class CurveServiceClient : FObjBase.Reflect.Reflect_SeviceClient, ICurveService
    {
        protected override Type InterfaceType => typeof(ICurveService);
        /// <summary>
        /// AD 曲线服务 客户端代理
        /// </summary>
        /// <param name="id"></param>
        public CurveServiceClient(UInt32 id) : base(id) { }

        /// <summary>
        /// AD 曲线服务 客户端代理
        /// </summary>
        /// <param name="serviceId">服务id</param>
        /// <param name="connName">连接器</param>
        public CurveServiceClient(UInt32 serviceId, string connName) : base(serviceId, connName) { }

        #region ICurveService 成员
        /// <summary>
        /// AD曲线校正方式
        /// </summary>
        public CurveCorrectWay CorrectWay { get; set; }

        public CurveType Flag { get; set; }

        [PropertyChanged.DoNotCheckEquality]
        public CurveCell[] Curves { get; set; }

        public void Apply(CurveCorrectWay correctWay, CurveType flag, CurveCell2[] curves)
        {
            Call(nameof(Apply), new { correctWay, flag, curves });
        }

        #endregion

    }
}
