public static MsgInfo Create(object data, string code = "", string description = "", string level = "", string message = "") { MsgInfo msgInfo = new MsgInfo(data); if (!string.IsNullOrEmpty(code)) msgInfo.Code = code; if (!string.IsNullOrEmpty(description)) msgInfo.Description = description; if (!string.IsNullOrEmpty(level)) msgInfo.Level = level; if (!string.IsNullOrEmpty(message)) msgInfo.Message = message; return msgInfo; }
public static MsgInfo Create(object data, string code = "", string description = "", string level = "", string message = "") { MsgInfo msgInfo = new MsgInfo(data); if (!string.IsNullOrEmpty(code)) { msgInfo.Code = code; } if (!string.IsNullOrEmpty(description)) { msgInfo.Description = description; } if (!string.IsNullOrEmpty(level)) { msgInfo.Level = level; } if (!string.IsNullOrEmpty(message)) { msgInfo.Message = message; } return(msgInfo); }