demo-xf-app-1a/MobileApp1/Services/CorporationMockService.cs

62 lines
1.4 KiB
C#
Raw Permalink Normal View History

2021-07-13 13:57:44 +00:00
namespace MobileApp1.Services
{
public class CorporationMockService : ICorporationService
{
public CorporationMockService()
{
}
public string DisplayName { get; set; } = "";
public bool IsLoggedIn { get; set; } = false;
public string AuthToken { get; set; } = "";
public ServiceResult Login(string username, string password)
{
System.Threading.Thread.Sleep(6000);
this.DisplayName = username;
this.IsLoggedIn = true;
return new ServiceResult()
{
IsSuccess = true,
Message = "Logged In"
};
}
public ServiceResult Logout()
{
System.Threading.Thread.Sleep(1000);
2021-07-13 13:57:44 +00:00
this.DisplayName = string.Empty;
this.IsLoggedIn = false;
return new ServiceResult()
{
IsSuccess = true,
Message = "Logged Out"
};
}
public ServiceResult RequestPasswordReset(string username)
{
System.Threading.Thread.Sleep(1000);
2021-07-13 13:57:44 +00:00
this.DisplayName = string.Empty;
this.IsLoggedIn = false;
return new ServiceResult()
{
IsSuccess = true,
Message = "Password Reset Requested"
};
}
}
}