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); }
public static IInstrument GetInstrument(string ticker) { return(AllInstrumentList.FirstOrDefault(v => v.Ticker == ticker)); }