public ParsedClass FindAndParse(SearchTask searchTask, string[] extensions, bool isApi) { try { if (string.IsNullOrWhiteSpace(searchTask.SearchLine)) { return(null); } var classes = _cashParser.FindAndParse(searchTask, extensions, isApi); foreach (var parsedClass in classes) { ExtendPreParsedClass(parsedClass); foreach (var newTask in UnknownTypes) { if (string.IsNullOrEmpty(newTask.SearchDir)) { newTask.SearchDir = searchTask.SearchDir; } } if (!parsedClass.Fields.Any() && parsedClass.Inherit.Count == 1 && (parsedClass.Inherit[0].IsArray || _knownTypes.ContainsKey(parsedClass.Inherit[0].CppName))) { if (Founded.ContainsKey(parsedClass.CppName)) { Founded[parsedClass.CppName] = parsedClass.Inherit[0].Name; } else { Founded.Add(parsedClass.CppName, parsedClass.Inherit[0].Name); } UnknownTypes.Add(new SearchTask { SearchLine = parsedClass.CppName, Converter = KnownConverter.None }); } if (FoundedClass.ContainsKey(parsedClass.Name)) { FoundedClass[parsedClass.Name] = parsedClass; } else { FoundedClass.Add(parsedClass.Name, parsedClass); } return(parsedClass); } } catch (Exception e) { throw new Exception($"{searchTask.SearchDir} | {searchTask.SearchLine}", e); } return(null); }
public object[] GetInsertableValues() { return(new string[] { Id.ToString(), Area.Id is null ? null : Area.Id.ToString(), Name, ShortName, TLA, Address, Phone, WebSite, Email, Founded.ToString(), ClubColors, Venue, Flag, LastUpdated });
public override int GetHashCode() { int hash = 17; hash = hash * 23 + Id.GetHashCode(); hash = hash * 23 + Name.GetHashCode(); hash = hash * 23 + Seats.GetHashCode(); hash = hash * 23 + Region.GetHashCode(); hash = hash * 23 + CoatOfArms.GetHashCode(); hash = hash * 23 + Words.GetHashCode(); hash = hash * 23 + Titles.GetHashCode(); hash = hash * 23 + CurrentLord.GetHashCode(); hash = hash * 23 + Founder.GetHashCode(); hash = hash * 23 + Founded.GetHashCode(); hash = hash * 23 + Heir.GetHashCode(); hash = hash * 23 + Overlord.GetHashCode(); hash = hash * 23 + DiedOut.GetHashCode(); hash = hash * 23 + AncestralWeapons.GetHashCode(); hash = hash * 23 + CadetBranches.GetHashCode(); return(hash); }