chore: initialize standalone UPM package
Publish UPM package / publish (push) Failing after 1s

This commit is contained in:
2026-08-26 02:50:38 +08:00
commit 05bfe9c430
43 changed files with 1417 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
#nullable enable
using ShrinkEventBus;
namespace ShrinkNetwork.Integration
{
public readonly struct ShrinkNetworkEventRequestOutcome
{
public ShrinkNetworkEventRequestOutcome(int errorCode, string errorMessage, EventResult result, bool isCanceled)
{
ErrorCode = errorCode;
ErrorMessage = errorMessage ?? string.Empty;
Result = result;
IsCanceled = isCanceled;
}
public int ErrorCode { get; }
public string ErrorMessage { get; }
public EventResult Result { get; }
public bool IsCanceled { get; }
public bool IsSuccess => ErrorCode == 0;
internal static ShrinkNetworkEventRequestOutcome FromResponse(ShrinkNetworkEventResultResponse response)
{
return new ShrinkNetworkEventRequestOutcome(
response?.ErrorCode ?? ShrinkRpcErrorCode.InvalidResponse,
response?.ErrorMessage ?? "Network event request returned an invalid response.",
response?.Result ?? EventResult.DEFAULT,
response?.IsCanceled ?? false);
}
}
}