コード例 #1
0
 public static void SerializeToFile(string fileName, ExportedBattle battle)
 {
     // Save the version for local editing.
     Directory.CreateDirectory(UiHelper.GetParentFolder(fileName));
     using (var writer = new StreamWriter(fileName))
     {
         var serial = new JsonSerializer();
         serial.Formatting = Newtonsoft.Json.Formatting.Indented;
         serial.Serialize(writer, battle);
     }
 }
コード例 #2
0
ファイル: FileHelper.cs プロジェクト: dj0817/YesWeDo
 public static string ToDefaultBattleExportFolder(string filename)
 {
     return(UiHelper.GetParentFolder(filename));
 }