34 lines
907 B
C#
34 lines
907 B
C#
using AssortValidator.Common.Models;
|
|
using System.Collections.Generic;
|
|
|
|
namespace AssortValidator.Common.Helpers
|
|
{
|
|
public static class CurrencyHelper
|
|
{
|
|
private static readonly Dictionary<CurrencyEnum, string> questLookup = new()
|
|
{
|
|
{ CurrencyEnum.Rouble, "5936d90786f7742b1420ba5b" },
|
|
{ CurrencyEnum.Euro, "5936da9e86f7742d65037edf" },
|
|
{ CurrencyEnum.USD, "59674cd986f7744ab26e32f2" },
|
|
};
|
|
|
|
public static string GetCurrencyByEnum(CurrencyEnum currencyType)
|
|
{
|
|
return questLookup[currencyType];
|
|
}
|
|
|
|
public static CurrencyEnum GetCurrencyById(string itemId)
|
|
{
|
|
foreach (var item in questLookup)
|
|
{
|
|
if (item.Value == itemId)
|
|
{
|
|
return item.Key;
|
|
}
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
}
|
|
}
|