Esempio n. 1
0
        public static Code toYahooFormat(Code code, Country country)
        {
            if (code == null)
            {
                throw new ArgumentException("Method parameters cannot be null in toYahooFormat");
            }

            Code result = code;

            if (country == Country.Malaysia)
            {
                String _code = code.toString();
                // Index's code start with ^. We will not intrude index's code.
                if (_code.StartsWith("^") == false && _code.EndsWith(".KL") == false)
                {
                    // This is not index's code, and it does not end with .KL.
                    // Let's intrude it!
                    result = Code.newInstance(_code + ".KL");
                }
            }

            return result;
        }