namespace AssetManager.Models; /// /// 支持的币种枚举 /// public enum Currency { /// /// 人民币 /// CNY = 0, /// /// 美元 /// USD = 1, /// /// 港币 /// HKD = 2 } /// /// 币种辅助类 /// public static class CurrencyHelper { private static readonly HashSet _supportedCurrencies = new(StringComparer.OrdinalIgnoreCase) { "CNY", "USD", "HKD" }; /// /// 检查币种是否支持 /// public static bool IsSupported(string currency) { return !string.IsNullOrEmpty(currency) && _supportedCurrencies.Contains(currency); } /// /// 获取支持的币种列表 /// public static List GetSupportedCurrencies() { return new List { "CNY", "USD", "HKD" }; } }