BulkDbServiceClient.cs 1.31 KB
using FLY.FeedbackRenZiJia.IService;
using FObjBase;
using FObjBase.Reflect;
using Newtonsoft.Json;
using System;

namespace FLY.FeedbackRenZiJia.Client
{
    public class BulkDbServiceClient : FObjBase.Reflect.Reflect_SeviceClient, IBulkDbService
    {
        protected override Type InterfaceType => typeof(IBulkDbService);

        public long LastId { get; set; }

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


        public void GetFrame(long Id, AsyncCBHandler asyncDelegate, object asyncContext)
        {
            Call(nameof(GetFrame), new { Id }, asyncDelegate, asyncContext);
        }

        /// <summary>
        /// 获取一幅稳定的数据;
        /// </summary>
        /// <param name="Id">以Id为起始点, 向前或者向后或者最近稳定的一幅数据</param>
        /// <param name="isPre"></param>
        /// <param name="asyncDelegate"></param>
        /// <param name="asyncContext"></param>
        [Call(typeof(GetStableFrameReponse))]
        public void GetStableFrame(long id, bool isPre, AsyncCBHandler asyncDelegate, object asyncContext)
        {
            Call(nameof(GetStableFrame), new { id, isPre }, asyncDelegate, asyncContext);
        }
    }
}