public RelicNote(CsvParser csv) { BookName = csv["EventItem"].Trim('"'); IEnumerable <KeyValuePair <string, int> > fatecols = csv.Columns.Where(x => x.Key.StartsWith("Fate")); FATEs = new List <FATEInfo>(fatecols.Count()); foreach (KeyValuePair <string, int> col in fatecols) { FATEs.Add(GameResources.GetFATEInfo(GameResources.GetFateId(Regex.Replace(csv[col.Key].Trim('"'), FATEInfo.HtmlTagsRegex, string.Empty), true))); } }
public RelicNote(CsvParser csv) { this.BookName = csv["EventItem"].Trim('"'); IEnumerable <KeyValuePair <string, int> > fatecols = from x in csv.Columns where x.Key.StartsWith("Fate", StringComparison.OrdinalIgnoreCase) select x; this.FATEs = new List <FATEInfo>(fatecols.Count <KeyValuePair <string, int> >()); foreach (KeyValuePair <string, int> col in fatecols) { this.FATEs.Add(GameResources.GetFATEInfo(GameResources.GetFateId(Regex.Replace(csv[col.Key].Trim('"'), "<.*?>", string.Empty), true))); } }