// -----------------------------------------------------------------------
//
// Copyright (c) lanedirt. All rights reserved.
// Licensed under the AGPLv3 license. See LICENSE.md file in the project root for full license information.
//
// -----------------------------------------------------------------------
namespace AliasVault.WorkerStatus.Extensions;
///
/// Extension methods for the Status enum.
///
internal static class StatusExtensions
{
///
/// String to Status enum conversion.
///
/// Status enum.
/// String as status enum.
/// Thrown if string is not a known status enum.
public static Status ToStatusEnum(this string status)
{
return Enum.TryParse(status, out Status result) ? result : throw new ArgumentException("Invalid status value");
}
}