You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
750 B
32 lines
750 B
3 weeks ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Text;
|
||
|
using System.Threading.Tasks;
|
||
|
|
||
|
namespace ReZero.SuperAPI
|
||
|
{
|
||
|
internal class ErrorParameterHelper
|
||
|
{
|
||
|
public static bool IsError(object? errorData)
|
||
|
{
|
||
|
return errorData != null;
|
||
|
}
|
||
|
|
||
|
public static async Task<object?> GetErrorParameters(List<ErrorParameter> errorParameters)
|
||
|
{
|
||
|
object? errorData = null;
|
||
|
if (errorParameters.Any())
|
||
|
{
|
||
|
var data = await Task.FromResult(new
|
||
|
{
|
||
|
ErrorParameters = errorParameters
|
||
|
});
|
||
|
errorData = data;
|
||
|
}
|
||
|
|
||
|
return errorData;
|
||
|
}
|
||
|
}
|
||
|
}
|