Beispiel #1
0
 /// <summary>
 /// 【系统响应】是否是对应的类型
 /// </summary>
 /// <param name="res"></param>
 /// <param name="type"></param>
 /// <returns></returns>
 public static bool IsSysRespType(this BasicMos.Resp.Resp res, SysRespTypes type) =>
 res.sys_ret == (int)type;
Beispiel #2
0
 /// <summary>
 ///  【系统响应】
 /// </summary>
 /// <param name="res"></param>
 /// <returns></returns>
 public static bool IsSysOk(this BasicMos.Resp.Resp res) =>
 res.sys_ret == 0;
Beispiel #3
0
 /// <summary>
 ///  【业务响应】是否是Success
 /// </summary>
 /// <param name="res"></param>
 /// <returns></returns>
 public static bool IsSuccess(this BasicMos.Resp.Resp res) =>
 res.ret == 0;
Beispiel #4
0
 /// <summary>
 /// 【业务响应】是否是对应的类型
 /// </summary>
 /// <param name="res"></param>
 /// <param name="type"></param>
 /// <returns></returns>
 public static bool IsRespType(this BasicMos.Resp.Resp res, RespTypes type) =>
 res.ret == (int)type;
Beispiel #5
0
 /// <summary>
 /// 处理响应转化
 /// </summary>
 /// <param name="res"></param>
 /// <param name="tPara"></param>
 /// <typeparam name="TRes"></typeparam>
 /// <returns></returns>
 public static TRes WithResp <TRes>(this TRes res, BasicMos.Resp.Resp tPara)
     where TRes : BasicMos.Resp.Resp
 {
     return(res.WithResp(tPara.sys_ret, tPara.ret, tPara.msg));
 }