first commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
namespace OpenWarehouse.warehouse.api.Common.TaskManager;
|
||||
|
||||
public static class TaskStatusClass
|
||||
{
|
||||
private static readonly Dictionary<TaskStatus, string?> TaskStatusDictionary = new()
|
||||
{
|
||||
{ TaskStatus.Accepted, "Accepted" },
|
||||
{ TaskStatus.Crated, "Created" },
|
||||
{ TaskStatus.Error, "Error" },
|
||||
{ TaskStatus.Processing, "Processing" },
|
||||
{ TaskStatus.Success, "Success" },
|
||||
{ TaskStatus.NotFullSuccess, "Not full sucess"}
|
||||
};
|
||||
|
||||
public static string ToString(this TaskStatus status)
|
||||
{
|
||||
if (!TaskStatusDictionary.TryGetValue(status, out string? value) && value == "")
|
||||
throw new NotImplementedException();
|
||||
return value ?? "";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user