// Token: 0x060019C5 RID: 6597 RVA: 0x0007B1FC File Offset: 0x000793FC public static bool Save([NotNull] RunReport runReport, [NotNull] string fileName) { string text = RunReport.FileNameToPath(fileName); bool result; try { if (!Directory.Exists(RunReport.runReportsFolder)) { Directory.CreateDirectory(RunReport.runReportsFolder); } XDocument xdocument = new XDocument(); xdocument.Add(HGXml.ToXml <RunReport>("RunReport", runReport)); xdocument.Save(text); result = true; } catch (Exception ex) { Debug.LogFormat("Could not save RunReport {0}: {1}", new object[] { text, ex.Message }); result = false; } return(result); }
// Token: 0x060019D4 RID: 6612 RVA: 0x0007B8D4 File Offset: 0x00079AD4 public static void ArrayToXml(XElement element, RunReport.PlayerInfo[] playerInfos) { element.RemoveAll(); for (int i = 0; i < playerInfos.Length; i++) { element.Add(HGXml.ToXml <RunReport.PlayerInfo>("PlayerInfo", playerInfos[i])); } }
// Token: 0x060019C0 RID: 6592 RVA: 0x0007AEEC File Offset: 0x000790EC public static void ToXml(XElement element, RunReport runReport) { element.RemoveAll(); element.Add(HGXml.ToXml <string>("version", "2")); element.Add(HGXml.ToXml <string>("gameModeName", runReport.gameModeName)); element.Add(HGXml.ToXml <GameResultType>("gameResultType", runReport.gameResultType)); element.Add(HGXml.ToXml <ulong>("seed", runReport.seed)); element.Add(HGXml.ToXml <Run.FixedTimeStamp>("snapshotTime", runReport.snapshotTime)); element.Add(HGXml.ToXml <RuleBook>("ruleBook", runReport.ruleBook)); element.Add(HGXml.ToXml <RunReport.PlayerInfo[]>("playerInfos", runReport.playerInfos)); }
// Token: 0x060019D2 RID: 6610 RVA: 0x0007B688 File Offset: 0x00079888 public static void ToXml(XElement element, RunReport.PlayerInfo playerInfo) { element.RemoveAll(); element.Add(HGXml.ToXml <string>("name", playerInfo.name)); element.Add(HGXml.ToXml <string>("bodyName", playerInfo.bodyName)); element.Add(HGXml.ToXml <string>("killerBodyName", playerInfo.killerBodyName)); element.Add(HGXml.ToXml <StatSheet>("statSheet", playerInfo.statSheet)); element.Add(HGXml.ToXml <ItemIndex[]>("itemAcquisitionOrder", playerInfo.itemAcquisitionOrder)); element.Add(HGXml.ToXml <int[]>("itemStacks", playerInfo.itemStacks, RunReport.PlayerInfo.itemStacksRules)); element.Add(HGXml.ToXml <EquipmentIndex[]>("equipment", playerInfo.equipment, RunReport.PlayerInfo.equipmentRules)); element.Add(HGXml.ToXml <int>("localPlayerIndex", playerInfo.localPlayerIndex)); element.Add(HGXml.ToXml <string>("userProfileFileName", playerInfo.userProfileFileName)); }
public static XElement ToXml <T>(string name, T value) { return(HGXml.ToXml <T>(name, value, HGXml.SerializationRules <T> .defaultRules)); }