Exemplo n.º 1
0
        public static Dictionary <string, StockInfoMongoData> getAllCodes(string DataType)
        {
            if (GlobalClass.TypeDataPoints[DataType].NeedLoadAllCodes == 0)
            {
                return(null);
            }
            List <string>  ret    = new List <string>();
            SecurityReader reader = new SecurityReader(DataType, GlobalClass.TypeDataPoints[DataType].StockListTable, null);
            MongoReturnDataList <StockInfoMongoData> mdl = reader.GetAllCodeDataList <StockInfoMongoData>(true);

            if (mdl == null)
            {
                return(null);
            }
            return(mdl.ToDictionary(p => (p as ICodeData).code, p => (p as StockInfoMongoData)));
        }