Exemplo n.º 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);
        }
Exemplo n.º 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);
        }