/// <summary> /// quice get a unsuccess scream result without data /// </summary> /// <returns></returns> public static ScreamResult Unsuccessful(params string[] errors) { var result = new ScreamResult(success: false) { Errors = errors?.ToList() ?? new List <string>(0) }; return(result); }
/// <summary> /// quice get a success scream result with data /// </summary> public static ScreamResult <T> Successful <T>(T data) { var result = new ScreamResult <T>(success: true) { Data = data }; return(result); }
/// <summary> /// quice get a unsuccess scream result with data /// </summary> public static ScreamResult <T> Unsuccessful <T>(T data, params string[] errors) { var result = new ScreamResult <T>(success: false) { Data = data, Errors = errors?.ToList() ?? new List <string>(0) }; return(result); }