19 lines
478 B
C#
Raw Normal View History

2023-05-11 23:11:39 -04:00
using SPTInstaller.Interfaces;
namespace SPTInstaller.Models;
2023-05-11 23:11:39 -04:00
public class Result : IResult
{
public bool Succeeded { get; private set; }
2023-05-11 23:11:39 -04:00
public string Message { get; private set; }
2023-05-11 23:11:39 -04:00
protected Result(string message, bool succeeded)
{
Message = message;
Succeeded = succeeded;
2023-05-11 23:11:39 -04:00
}
public static Result FromSuccess(string message = "") => new(message, true);
public static Result FromError(string message) => new(message, false);
}