47 lines
849 B
C#
47 lines
849 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
|
|
namespace ServerBase;
|
|
|
|
//=============================================================================================
|
|
// 오류 관련 각종 지원 함수
|
|
//
|
|
// author : kangms
|
|
//
|
|
//=============================================================================================
|
|
|
|
public static class ErrorHelper
|
|
{
|
|
public static bool isSuccess(this ServerErrorCode error)
|
|
{
|
|
if(ServerErrorCode.Success == error)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
public static bool isFail(this ServerErrorCode error)
|
|
{
|
|
if (ServerErrorCode.Success != error)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
public static string toBasicString(this ServerErrorCode error)
|
|
{
|
|
return $"ErrorCode:{error.ToString()}";
|
|
}
|
|
}
|