private bool FinishItem(PgReportList item, Dictionary <string, object> contentTable, Dictionary <string, Json.Token> contentTypeTable, List <object> itemCollection, Json.Token lastItemType, string parsedFile, string parsedKey) { foreach (KeyValuePair <string, object> Entry in contentTable) { string Key = Entry.Key; object Value = Entry.Value; if (!int.TryParse(Key, out int EntryLevel)) { return(Program.ReportFailure($"Invalid report key '{Key}'")); } if (!(Value is string EntryString)) { return(Program.ReportFailure($"Invalid report value '{Value}'")); } PgReport NewReport = new PgReport() { RawReportLevel = EntryLevel, Text = EntryString }; ParsingContext.AddSuplementaryObject(NewReport); item.List.Add(NewReport); } return(true); }
private bool ParseReports(PgSkill item, object value, string parsedFile, string parsedKey) { PgReportList ParsedPeportList = null !; if (!Inserter <PgReportList> .SetItemProperty((PgReportList valueReportList) => ParsedPeportList = valueReportList, value)) { return(false); } foreach (PgReport Report in ParsedPeportList.List) { item.ReportList.Add(Report); } return(true); }