Exemple #1
0
        /// <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);
        }
Exemple #2
0
        /// <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);
        }