2023-04-13 11:51:03 +08:00
|
|
|
using System;
|
2023-09-14 23:55:38 +08:00
|
|
|
using Aitex.Core.RT.DBCore;
|
2023-04-13 11:51:03 +08:00
|
|
|
|
|
|
|
namespace Aitex.Core.Account
|
|
|
|
{
|
2023-09-14 23:55:38 +08:00
|
|
|
[Serializable]
|
|
|
|
public class LoginResult
|
|
|
|
{
|
|
|
|
#region Constructors
|
2023-04-13 11:51:03 +08:00
|
|
|
|
2023-09-14 23:55:38 +08:00
|
|
|
public LoginResult() : this(LoginRequestResults.Error, Credential.Empty)
|
|
|
|
{
|
2023-04-13 11:51:03 +08:00
|
|
|
|
2023-09-14 23:55:38 +08:00
|
|
|
}
|
2023-04-13 11:51:03 +08:00
|
|
|
|
2023-09-14 23:55:38 +08:00
|
|
|
public LoginResult(LoginRequestResults result) : this(result, Credential.Empty)
|
|
|
|
{
|
2023-08-28 23:30:37 +08:00
|
|
|
|
2023-09-14 23:55:38 +08:00
|
|
|
}
|
2023-09-13 17:31:22 +08:00
|
|
|
|
2023-09-14 23:55:38 +08:00
|
|
|
public LoginResult(LoginRequestResults result, Credential cred)
|
|
|
|
{
|
|
|
|
Result = result;
|
|
|
|
Credential = cred;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
2023-08-29 17:45:38 +08:00
|
|
|
|
2023-09-13 17:31:22 +08:00
|
|
|
#region Properties
|
|
|
|
|
2023-08-29 17:45:38 +08:00
|
|
|
/// <summary>
|
2023-09-13 17:31:22 +08:00
|
|
|
/// 设置或返回是否登录成功。
|
2023-08-29 17:45:38 +08:00
|
|
|
/// </summary>
|
2023-09-13 17:31:22 +08:00
|
|
|
public LoginRequestResults Result { get; set; }
|
|
|
|
|
2023-08-29 17:45:38 +08:00
|
|
|
/// <summary>
|
2023-09-13 17:31:22 +08:00
|
|
|
/// 登录凭据。
|
2023-08-29 17:45:38 +08:00
|
|
|
/// </summary>
|
2023-09-13 17:31:22 +08:00
|
|
|
public Credential Credential { get; set; }
|
2023-08-29 17:45:38 +08:00
|
|
|
|
2023-09-13 17:31:22 +08:00
|
|
|
#endregion
|
2023-08-29 17:45:38 +08:00
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public override string ToString()
|
|
|
|
{
|
2023-09-13 17:31:22 +08:00
|
|
|
return Result.ToString();
|
2023-08-29 17:45:38 +08:00
|
|
|
}
|
2023-04-13 11:51:03 +08:00
|
|
|
}
|
|
|
|
}
|