using FLY.Thick.FilmCasting.Common;
using FLY.Thick.FilmCasting.IService;
using FObjBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FLY.Thick.FilmCasting.Client
{
    public class FilmCastingProfileServiceClient : FObjBase.Reflect.Reflect_SeviceClient, IFilmCastingProfileService
    {
        protected override Type InterfaceType => typeof(IFilmCastingProfileService);

        public FilmCastingProfileParam Param { get; private set; } = new FilmCastingProfileParam();

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

        public void Apply(FilmCastingProfileParam param)
        {
            Call(nameof(Apply), new { param });

        }

        public void Del(string productname)
        {
            Call(nameof(Del), new { productname });
        }

        public void GetList(AsyncCBHandler asyncDelegate, object asyncContext)
        {
            Call(nameof(GetList), null, asyncDelegate, asyncContext);
        }

        public void Read(string productname, AsyncCBHandler asyncDelegate, object asyncContext)
        {
            Call(nameof(Read), new { productname }, asyncDelegate, asyncContext);
        }
    }
}
