초기커밋
This commit is contained in:
46
ServerBase/Helper/ErrorHelper.cs
Normal file
46
ServerBase/Helper/ErrorHelper.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
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()}";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user