mirror of
https://github.com/JogmansonReal/Radicade.git
synced 2026-10-25 23:18:56 -07:00
21 lines
514 B
C#
21 lines
514 B
C#
namespace RadicadeServer.RecNet.Responses
|
|
{
|
|
public class Success
|
|
{
|
|
internal static readonly Success Ok = new Success(true, null, null);
|
|
internal static Success Error(string why) => new Success(false, why, null);
|
|
|
|
public bool success { get; set; }
|
|
|
|
public string error { get; set; } = string.Empty;
|
|
|
|
public object? value { get; set; }
|
|
|
|
public Success(bool success, string? error, object? value) {
|
|
this.success = success;
|
|
this.error = error ?? string.Empty;
|
|
this.value = value;
|
|
}
|
|
}
|
|
}
|