using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace GB5Shared.ResponseStandard { public class Result { public bool IsSuccess { get; } public string Error { get; } public T Value { get; } private Result(bool isSuccess, T value, string error) { IsSuccess = isSuccess; Error = error; Value = value; } public static Result Success(T value) => new Result(true, value, string.Empty); public static Result Failure(string error) => new Result(false, default(T), error); } }