public static string GetMessage(this AutoModErrorCode code) { if (code.IsSilent()) { return(string.Empty); } return(code switch { AutoModErrorCode.NotEnoughSpace => "Not enough space in the box.", AutoModErrorCode.InvalidLines => "Invalid lines detected.", _ => string.Empty, });
public static string GetMessage(this AutoModErrorCode code) { if (code.IsSilent()) { return(string.Empty); } switch (code) { case AutoModErrorCode.NotEnoughSpace: return("Not enough space in the box."); case AutoModErrorCode.InvalidLines: return("Invalid lines detected."); default: return(string.Empty); } }