You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
C#
42 lines
1.1 KiB
C#
namespace Ds.Module.ResultFilter
|
|
{
|
|
public static class DsResultTool
|
|
{
|
|
public static Dictionary<DsResultCode, string> DescriptionsDictionary = EnumHelper.GetDescriptions<DsResultCode>();
|
|
|
|
public static DsJsonResult Success()
|
|
{
|
|
return new DsJsonResult(true);
|
|
}
|
|
|
|
public static DsJsonResult Success(Object data)
|
|
{
|
|
return new DsJsonResult(true, data);
|
|
}
|
|
|
|
public static DsJsonResult Fail()
|
|
{
|
|
return new DsJsonResult(false);
|
|
}
|
|
|
|
public static DsJsonResult Fail(DsResultCode resultCode)
|
|
{
|
|
return new DsJsonResult(false, resultCode);
|
|
}
|
|
|
|
public static DsJsonResult Fail(DsResultCode resultCode, string msg)
|
|
{
|
|
return new DsJsonResult(false, resultCode, msg);
|
|
}
|
|
|
|
public static DsJsonResult Fail(string msg)
|
|
{
|
|
return new DsJsonResult(false, msg);
|
|
}
|
|
|
|
public static DsJsonResult Fail(bool b, DsResultCode resultCode, string message)
|
|
{
|
|
return new DsJsonResult(b, resultCode, message);
|
|
}
|
|
}
|
|
} |