示例#1
0
文件: Data.cs 项目: fishstoryyy/Lean
        /// <summary>
        /// Get the price in QCC for a given data file
        /// </summary>
        /// <param name="path">Lean data path of the file</param>
        /// <returns>QCC price for data, -1 if no entry found</returns>
        public int GetPrice(string path)
        {
            if (path == null)
            {
                return(-1);
            }

            var entry = Prices.FirstOrDefault(x => Regex.IsMatch(path, x.RegEx));

            return(entry == null ? -1 : entry.Price);
        }
示例#2
0
文件: Data.cs 项目: Capnode/Algoloop
        /// <summary>
        /// Get the price in QCC for a given data file
        /// </summary>
        /// <param name="path">Lean data path of the file</param>
        /// <returns>QCC price for data, -1 if no entry found</returns>
        public int GetPrice(string path)
        {
            if (path == null)
            {
                return(-1);
            }

            var entry = Prices.FirstOrDefault(x => x.RegEx.IsMatch(path));

            return(entry?.Price ?? -1);
        }