Ejemplo n.º 1
0
 public CustomerInfo()
 {
     CurrencyType = new Currency_ExRate();
 }
Ejemplo n.º 2
0
        public Currency_ExRate GetCurrencyByName(string name)
        {
            name = name.Trim();

            if (string.IsNullOrEmpty(name))
            {
                return(null);
            }

            switch (name)
            {
            case "gcp":
                name = "gemcuttersprism";
                break;

            case "blessed":
                name = "blessedorb";
                break;

            case "chrome":
                name = "chromaticorb";
                break;

            case "divine":
                name = "divineorb";
                break;

            case "exalted":
                name = "exaltedorb";
                break;

            case "jewellers":
                name = "jewellersorb";
                break;

            case "mirror":
                name = "mirrorofkalandra";
                break;

            case "alch":
                name = "orbofalchemy";
                break;

            case "alt":
                name = "orbofalteration";
                break;

            case "chance":
                name = "orbofchance";
                break;

            case "fusing":
                name = "orboffusing";
                break;

            case "regret":
                name = "orbofregret";
                break;

            case "scour":
                name = "orbofscouring";
                break;

            case "transmute":
                name = "orboftransmutation";
                break;

            case "regal":
                name = "regalorb";
                break;

            case "vaal":
                name = "vaalorb";
                break;

            case "aug":
                name = "orbofaugmentation";
                break;

            case "chaos":
                name = "chaosorb";
                break;

            case "chisel":
                name = "cartographerschisel";
                break;
            }

            // Normalize Name
            name = name.Replace(" ", "").Replace("'", "");

            Currency_ExRate returnRate = CurrenciesList.Find((Currency_ExRate c) => c.NormalName.Equals(name.ToLower()));

            if (returnRate == null)
            {
                Logger.Application.Error($"Exchange Rate not found, {name}");
            }

            return(returnRate);
        }