Example #1
0
        /// <summary>
        /// 入口
        /// </summary>
        public void Request()
        {
            try
            {
                LoadConfig();//加载配置
            }
            catch (Exception ex)
            {
                log.WriteLog(E_ProcessLogType.Error, "加载配置异常。" + ex.Message);
                return;
            }

            TaskHelper.RegisterTask(() =>
            {
                try
                {
                    List <DC_WRITE_DATA> datas = dC_Service.GetWriteDatasUpdated();
                    foreach (var obj in WriteObjects)
                    {
                        try
                        {
                            obj.Request(datas);
                        }
                        catch (Exception ex)
                        {
                            log.WriteLog(E_ProcessLogType.Error, "写入数据异常。" + ex.Message);
                        }
                    }
                }
                catch (Exception ex)
                {
                    log.WriteLog(E_ProcessLogType.Error, "查询已更新写入数据异常。" + ex.Message);
                }
            });
        }