コード例 #1
0
        public async Task <ResponseMessage> GetDeviceCallBack(DeviceInternals examineResponse)
        {
            using (var scope = ApplicationContext.Current.ServiceProvider.GetRequiredService <IServiceScopeFactory>().CreateScope())
            {
                var reqService = scope.ServiceProvider.GetRequiredService <DeviceController>();

                switch (examineResponse.funtype)
                {
                case FunctionType.ChannelInfoBySrc:
                {
                    var f = await reqService.ChannelsByProgrammeId(examineResponse.SrcId, examineResponse.Status);

                    var ret = new ResponseMessage <List <CaptureChannelInfoInterface> >()
                    {
                        Code = f.Code,
                        Msg  = f.Msg,
                        Ext  = _mapper.Map <List <CaptureChannelInfoInterface> >(f.Ext),
                    };
                    return(ret);
                } break;

                case FunctionType.SingnalInfoByChannel:
                {
                    return(await reqService.GetChannelSignalSrc(examineResponse.ChannelId));
                }

                case FunctionType.ChannelUnitMap:
                {
                    return(await reqService.GetChannelUnitMapID(examineResponse.ChannelId));
                }


                default:
                    break;
                }
                //var response = await scope.ServiceProvider.GetRequiredService<GlobalController>()
                //    .SubmitGlobalCallback();

                //return Mapper.Map<ResponseMessage>(response);
            }

            return(null);
        }
コード例 #2
0
 public async Task <ResponseMessage> SubmitDeviceCallBack(DeviceInternals examineResponse)
 {
     throw new NotImplementedException();
 }