Пример #1
0
        public static Result Success(object data, CodeMsg codeMsg = null)
        {
            if (codeMsg == null)
            {
                codeMsg = CodeMsg.Success();
            }

            return(new Result(codeMsg.Code(), codeMsg.Msg(), data));
        }
Пример #2
0
 public static Result Error(CodeMsg codeMsg, object data = null)
 {
     return(new Result(codeMsg.Code(), codeMsg.Msg(), data));
 }