using FLY.Thick.Blowing.Common;
using FLY.Thick.Blowing.IService;
using FLY.Thick.Blowing.OBJ_INTERFACE;
using FObjBase;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FLY.Thick.Blowing.Client
{
    public class BlowingFixProfileServiceClient : FObjBase.Reflect.Reflect_SeviceClient, IBlowingFixProfileService
    {

        protected override Type InterfaceType => typeof(IBlowingFixProfileService);

        public BlowingFixProfileServiceClient(UInt32 serviceId) : base(serviceId) { }

        public BlowingFixProfileServiceClient(UInt32 serviceId, string connName) : base(serviceId, connName) { }

        #region IProfileService  接口

        public BlowingFixProfileParam Param { get; } = new BlowingFixProfileParam();



        /// <summary>
        /// 应用 &amp; 保存
        /// </summary>
        public void Apply(BlowingFixProfileParam param)
        {
            Call(nameof(Apply), new { param });
        }



        /// <summary>
        /// 获取产品列表, 返回类型为 List&lt;string&gt;
        /// </summary>
        /// <param name="asyncDelegate"></param>
        /// <param name="asyncContext"></param>
        public void GetList(AsyncCBHandler asyncDelegate, object asyncContext)
        {
            Call(nameof(GetList), null, asyncDelegate, asyncContext);
        }

        /// <summary>
        /// 删除指定产品
        /// </summary>
        /// <param name="productname"></param>
        public void Del(string productname)
        {
            Call(nameof(Del), new { productname });
        }

        /// <summary>
        /// 读取指定产品,返回类型为 ProfileParam
        /// </summary>
        /// <param name="productname"></param>
        /// <param name="asyncDelegate"></param>
        /// <param name="asyncContext"></param>
        public void Read(string productname, AsyncCBHandler asyncDelegate, object asyncContext)
        {
            Call(nameof(Read), new { productname }, asyncDelegate, asyncContext);
        }
        #endregion
    }
}