b6be7a351f
* First pass * First pass adding service registraiton * Finished up service registration * Json exception * Moved to the right place * Fixed tests * Added some missing docs strings * Reflecting Gergo's specklepy changes * Correct the DI registration * Readme * No warn beta packages * Format * renamed misleading variable * Fixed lock files * Disable SQLite for automate
20 lines
596 B
C#
20 lines
596 B
C#
namespace Speckle.Automate.Sdk.Schema;
|
|
|
|
public abstract class ObjectResultLevelMapping
|
|
{
|
|
private const string SUCCESS = "SUCCESS";
|
|
private const string INFO = "INFO";
|
|
private const string WARNING = "WARNING";
|
|
private const string ERROR = "ERROR";
|
|
|
|
public static string Get(ObjectResultLevel level) =>
|
|
level switch
|
|
{
|
|
ObjectResultLevel.Error => ERROR,
|
|
ObjectResultLevel.Warning => WARNING,
|
|
ObjectResultLevel.Info => INFO,
|
|
ObjectResultLevel.Success => SUCCESS,
|
|
_ => throw new ArgumentOutOfRangeException($"Not valid value for enum {level}"),
|
|
};
|
|
}
|