Exemple #1
0
        public static string GetInstrumentSectorName(string ticker, DistributeAnalyseType secType = DistributeAnalyseType.Industory)
        {
            var inst = AllInstrumentList.FirstOrDefault(i => i.Ticker == ticker);

            if (inst != null)
            {
                if (secType == DistributeAnalyseType.Industory)
                {
                    return(inst.Industory);
                }
                if (secType == DistributeAnalyseType.Region)
                {
                    return(inst.Region);
                }
                if (secType == DistributeAnalyseType.Instrument)
                {
                    return(inst.Name);
                }
            }
            return(null);
        }
Exemple #2
0
 public static IInstrument GetInstrument(string ticker)
 {
     return(AllInstrumentList.FirstOrDefault(v => v.Ticker == ticker));
 }