You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.3 KiB
53 lines
1.3 KiB
using System.Collections; |
|
using System.Collections.Generic; |
|
using UnityEngine; |
|
|
|
namespace MobileCFFSInfo |
|
{ |
|
/// <summary> |
|
/// 表示错误信息。 |
|
/// </summary> |
|
public struct ErrorInfo |
|
{ |
|
/// <summary> |
|
/// 表示错误码。 |
|
/// </summary> |
|
public int ErrorCode { get; set; } |
|
/// <summary> |
|
/// 表示错误消息。 |
|
/// </summary> |
|
public string ErrorMessage { get; set; } |
|
|
|
/// <summary> |
|
/// 创建一个错误信息实例。 |
|
/// </summary> |
|
/// <param name="errorCode">错误码</param> |
|
/// <param name="errorMessage">错误消息</param> |
|
public ErrorInfo(int errorCode, string errorMessage) |
|
{ |
|
ErrorCode = errorCode; |
|
ErrorMessage = errorMessage; |
|
} |
|
|
|
/// <summary> |
|
/// 创建一个错误信息实例。 |
|
/// </summary> |
|
/// <param name="errorCode">错误码枚举</param> |
|
public ErrorInfo(ErrorCode errorCode) |
|
{ |
|
ErrorCode = (int)errorCode; |
|
ErrorMessage = errorCode.ToString(); |
|
} |
|
} |
|
|
|
/// <summary> |
|
/// 表示错误码。 |
|
/// </summary> |
|
public enum ErrorCode |
|
{ |
|
许可证到期 = 1024, |
|
授权用户已达最大数, |
|
客户端身份与发送的数据不匹配 |
|
} |
|
} |
|
|
|
|