using System.Text;
namespace AIStudio.Tools;
public static class CommonTools
{
///
/// Get all the values (the names) of an enum as a string, separated by commas.
///
/// The enum type to get the values of.
/// The values to exclude from the result.
/// The values of the enum as a string, separated by commas.
public static string GetAllEnumValues(params TEnum[] exceptions) where TEnum : struct, Enum
{
var sb = new StringBuilder();
foreach (var value in Enum.GetValues())
if(!exceptions.Contains(value))
sb.Append(value).Append(", ");
return sb.ToString();
}
}