Example #1
0
 /// <summary>
 /// 创建返回结果
 /// </summary>
 /// <param name="code"></param>
 /// <param name="data"></param>
 /// <returns></returns>
 public static BaseResponse CreateBaseResponse(EnumPlatform.EResponseCode code, Object data)
 {
     return(new BaseResponse()
     {
         Code = code,
         Message = code.ToString(),
         Data = data
     });
 }
Example #2
0
 public static VerifyResult CreateVerifyResult(bool isPass, EnumPlatform.EResponseCode code, string errorMessage = "")
 {
     return(new VerifyResult
     {
         IsPass = isPass,
         Code = code,
         ErrorMessage = string.IsNullOrEmpty(errorMessage) ? code.ToString() : errorMessage
     });
 }