17 using Newtonsoft.Json;
18 using System.Collections.Generic;
19 using System.Text.RegularExpressions;
32 public string Link {
get;
set; }
42 public double Cost {
get;
set; }
53 [JsonProperty(PropertyName =
"objects")]
65 public List<PriceEntry>
Prices {
get;
set; }
70 [JsonProperty(PropertyName =
"agreement")]
85 var entry =
Prices.FirstOrDefault(x => x.RegEx.IsMatch(path));
86 return entry?.Price ?? -1;
100 [JsonProperty(PropertyName =
"vendorName")]
112 if (_regex ==
null &&
RawRegEx !=
null)
114 _regex =
new Regex(
RawRegEx.TrimStart(
'/').TrimEnd(
'm').TrimEnd(
'/'), RegexOptions.Compiled);
123 [JsonProperty(PropertyName =
"regex")]
134 public string Type {
get;
set; }
149 public HashSet<string>
Paths {
get;
set; }