class Result<T> -> readonly struct Result<T>

This commit is contained in:
ikpil 2023-04-22 12:53:41 +09:00
parent 364a197ec2
commit f4406b05e0
3 changed files with 6 additions and 6 deletions

View File

@ -68,7 +68,7 @@ namespace DotRecast.Detour
}
}
public class Result<T>
public readonly struct Result<T>
{
public readonly T result;
public readonly Status status;

View File

@ -22,11 +22,11 @@ namespace DotRecast.Detour
{
public class Status
{
public static Status FAILURE = new Status(0);
public static Status SUCCSESS = new Status(1);
public static Status IN_PROGRESS = new Status(2);
public static Status PARTIAL_RESULT = new Status(3);
public static Status FAILURE_INVALID_PARAM = new Status(4);
public static readonly Status FAILURE = new Status(0);
public static readonly Status SUCCSESS = new Status(1);
public static readonly Status IN_PROGRESS = new Status(2);
public static readonly Status PARTIAL_RESULT = new Status(3);
public static readonly Status FAILURE_INVALID_PARAM = new Status(4);
public int Value { get; }