26 lines
813 B
C#
26 lines
813 B
C#
|
namespace HermesSocketServer.Requests
|
||
|
{
|
||
|
public class RequestResult
|
||
|
{
|
||
|
public bool Success;
|
||
|
public object? Result;
|
||
|
public bool NotifyClientsOnAccount;
|
||
|
|
||
|
private RequestResult(bool success, object? result, bool notifyClientsOnAccount = true)
|
||
|
{
|
||
|
Success = success;
|
||
|
Result = result;
|
||
|
NotifyClientsOnAccount = notifyClientsOnAccount;
|
||
|
}
|
||
|
|
||
|
public static RequestResult Successful(object? result, bool notifyClientsOnAccount = true)
|
||
|
{
|
||
|
return RequestResult.Successful(result, notifyClientsOnAccount);
|
||
|
}
|
||
|
|
||
|
public static RequestResult Failed(string error, bool notifyClientsOnAccount = true)
|
||
|
{
|
||
|
return RequestResult.Successful(error, notifyClientsOnAccount);
|
||
|
}
|
||
|
}
|
||
|
}
|